Convert datetime
values to numeric representations
X = convertTo(
converts the D
,dateType
)datetime
values in D
to the numeric
representation specified by dateType
and returns a numeric array. For
example, if dateType
is 'posixtime'
, then
convertTo
converts each element of D
to the number
of seconds that have elapsed since the epoch of January 1, 1970,
00:00:00 UTC.
All numeric representations describe dates and times with respect to a point in time called an epoch. Computers typically measure time by the number of seconds or clock ticks since the specified epoch.
X = convertTo(
specifies an epoch and number of clock ticks per second using name-value pair arguments. For
example, if you specify the epoch as D
,'epochtime',Name,Value
)'Epoch','2001-01-01'
, then each
value in X
represents the number of seconds before or after midnight on
January 1, 2001.
datenum
| datetime
| exceltime
| juliandate
| posixtime
| timezones
| yyyymmdd