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
   05-Sep-2024 15:48:04   05-Sep-2024 15:49:04   05-Sep-2024 15:50:04

m = minute(t)
m = 1×3

    48    49    50

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

| | | |