Main Content

minute

Minute component of input date and time

Description

example

m = minute(t) returns the minute component for each date and time specified in t.

The m output is a double array and contains integer values from 0 to 59. To assign minute values to the minute component of values in t, use t.Minute and modify the Minute property.

Examples

collapse all

t1 = datetime('now');
t = t1 + minutes(2:4)
t = 1x3 datetime
   31-Aug-2022 03:40:45   31-Aug-2022 03:41:45   31-Aug-2022 03:42:45

m = minute(t)
m = 1×3

    40    41    42

Input Arguments

collapse all

Input date and time, specified as a datetime array.

To support existing code that previously required Financial Toolbox™, minute also accepts serial date numbers and text as inputs, but they are not recommended. For more information, see Version History.

Extended Capabilities

Version History

Introduced in R2014b

expand all

See Also

| | | |