minutes
Creates durations from numbers of minutes, or converts durations to minutes.
Category: Language Fundamentals > Data Types
Syntax
d = minutes(x)
Returns a duration array in which each value of x is a number of minutes.
x = minutes(d)
Returns the number of minutes in the duration array d, as a double.
Description
The function works in both directions, so minutes(hours(1.5)) converts 1.5 hours into 90. A duration shows in minutes when its length is between 1 minute and 1 hour, but the stored value does not depend on the display unit. Adding it to a datetime shifts the time.
Input arguments
x- Numeric array.
d- A duration array.
Output arguments
d- duration array, same size as
x. x- Double array, same size as
d.
Example
Minutes in and out
minutes(90)
minutes(hours(1.5))
datetime(2024,1,1,10,0,0) + minutes(75)
Output
ans = duration
90 min
ans = 90
ans = datetime
01-Jan-2024 11:15:00