Main Content


Minute component of input date and time



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.


collapse all

t1 = datetime('now');
t = t1 + minutes(2:4)
t = 1x3 datetime
   13-Feb-2024 00:27:25   13-Feb-2024 00:28:25   13-Feb-2024 00:29:25

m = minute(t)
m = 1×3

    27    28    29

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

| | | |