Current date and time as serial date number
t = now
returns the current date and time as a serial date number.
A serial date number represents the whole and fractional number of days starting from a
fixed, preset date (January 0,
0000).
MATLAB® Online™ returns the current date and time in Coordinated Universal Time (UTC) rather than local time.
To represent the current date and time as a serial date number, as text, or as a
datetime
value, use the function calls shown in the table.
Function Call | Output |
---|---|
| Current date as a serial date number |
| Current time as a serial date number |
| Current date and time as text |
| |
| |
| Current date and time as a |
|