days
Duration in days
Syntax
Description
D = days(
returns an array of
fixed-length days equivalent to the values in the input array.X
)
If
X
is a numeric array, thenD
is aduration
array in units of fixed-length days. A fixed-length day is equal to 24 hours.If
X
is aduration
array, thenD
is adouble
array with each element equal to the number of fixed-length (24-hour) days in the corresponding element ofX
.
The days
function converts between
duration
and double
values. To display
a duration in units of days, set its Format
property to
'd'
.
Examples
Input Arguments
Tips
days
creates fixed-length (24 hour) days. To create days that account for Daylight Saving Time shifts when used in calendar calculations, use thecaldays
function.
Extended Capabilities
Version History
Introduced in R2014b