Determine if input is datetime array
tf = isdatetime(t)
example
tf = isdatetime(t) returns logical 1 (true) if t is a datetime array. Otherwise, it returns logical 0 (false).
t
1
true
0
false
collapse all
Define an array.
A = [datetime('now');datetime('tomorrow');datetime(2016,1,15)]
A = 3x1 datetime 17-Aug-2020 15:39:36 18-Aug-2020 00:00:00 15-Jan-2016 00:00:00
Determine if the array is a datetime array.
datetime
tf = isdatetime(A)
tf = logical 1
Input array, specified as a scalar, vector, matrix, or multidimensional array. t can be any data type.
This function fully supports distributed arrays. For more information, see Run MATLAB Functions with Distributed Arrays (Parallel Computing Toolbox).
datetime | iscalendarduration | isduration
iscalendarduration
isduration
You have a modified version of this example. Do you want to open this example with your edits?