Skip to content

isdatetime

time · scripts/time/isdatetime.m

: tf = isdatetime (x)

Return true if x is a datetime array.

tf is logical true when x is a datetime object, and false for every other type (including numeric serial dates, character dates, and duration values).

isdatetime (datetime (2024, 1, 15))
     ⇒   1

isdatetime (now)
     ⇒   0