Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

isnat

Determine NaT (Not-a-Time) elements

Syntax

tf = isnat(A)

Description

example

tf = isnat(A) returns an array the same size as the datetime array, A, containing logical 1 (true) where the elements of A are Not-a-Time (NaTs) and logical 0 (false) where they are not. NaT represents a datetime that is undefined.

Examples

collapse all

Create a datetime array from numeric values containing NaN.

d = datetime(2014,[1 2 NaN 4],1)
d = 1x4 datetime array
   01-Jan-2014   01-Feb-2014   NaT           01-Apr-2014

Determine if any elements of d are NaT (Not-a-Time).

isnat(d)
ans = 1x4 logical array
   0   0   1   0

Input Arguments

collapse all

Input array, specified as a datetime array.

Extended Capabilities

See Also

|

Introduced in R2014b

Was this topic helpful?