Categories &

Functions List

Function Reference: NaT

Function: NaT
Function: T = NaT (n)
Function: T = NaT (sz1, …, szN)
Function: T = NaT (sz)
Function: T = NaT (…, 'Format', fmt)
Function: T = NaT (…, 'TimeZone', tz)

“Not-a-Time”. Creates missing-valued datetime arrays.

T = NaT (n) creates an N×N datetime matrix with all values being Not-a-Time (NaT). When called with no size input values, it returns a NaT datetime scalar.

T = NaT (sz1, …, szN) returns a datetime array with NaT values sized according to the input arguments sz1, …, szN. Alternatively, individual input size arguments can be merged into a single size vector sz, as in the following syntax T = NaT (sz).

T = NaT (…, 'Format', fmt) returns a datetime array of NaT values with the specified display format.

T = NaT (…, 'TimeZone', tz) returns a datetime array of NaT values n the time zone specified by tz.

NaT is the datetime equivalent of NaN. It represents a missing or invalid value. NaT values never compare equal to, greater than, or less than any value, including other NaTs. Doing arithmetic with a NaT and any other value results in a NaT.

See also: datetime

Source Code: NaT