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 = 1×3 datetime
   01-Feb-2025 09:12:24   01-Feb-2025 09:13:24   01-Feb-2025 09:14:24

m = minute(t)
m = 1×3

    12    13    14

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

expand all

Version History

Introduced in R2014b

expand all

See Also

| | | |