DocumentationHelp Center
Determine if input is datetime array
tf = isdatetime(t)
example
tf = isdatetime(t)returns logical1(true) iftis a datetime array. Otherwise, it returns logical0(false).
t
1
true
0
false
collapse all
Define an array.
A = [datetime('now');datetime('tomorrow');datetime(2016,1,15)]
A =3x1 datetime24-Aug-2020 20:05:35 25-Aug-2020 00:00:00 15-Jan-2016 00:00:00
Determine if the array is adatetimearray.
datetime
tf = isdatetime(A)
tf =logical1
Input array, specified as a scalar, vector, matrix, or multidimensional array.tcan be any data type.
This function fully supports distributed arrays. For more information, seeRun MATLAB Functions with Distributed Arrays(Parallel Computing Toolbox).
datetime|iscalendarduration|isduration
iscalendarduration
isduration
A modified version of this example exists on your system. Do you want to open this version instead?
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select:.
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office
Get trial now