Main Content

minute

Minute component of input date and time

Description

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.

example

Examples

collapse all

t1 = datetime('now');
t = t1 + minutes(2:4)
t = 1x3 datetime
   20-Jul-2024 15:24:29   20-Jul-2024 15:25:29   20-Jul-2024 15:26:29

m = minute(t)
m = 1×3

    24    25    26

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

| | | |