Main Content




m = minute(t) returns the minute numbers of the datetime values in t. The m output is a double array the same size as t and contains integer values from 0 to 59.

The minute function returns the minute numbers of datetime values. To assign minute values to a datetime array, t, use t.Minute and modify the Minute property.


collapse all

t1 = datetime('now');
t = t1 + minutes(2:4)
t = 1x3 datetime
   23-Feb-2021 15:06:50   23-Feb-2021 15:07:50   23-Feb-2021 15:08:50

m = minute(t)
m = 1×3

     6     7     8

Input Arguments

collapse all

Input date and time, specified as a datetime array.

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.

See Also

| | | |

Introduced in R2014b