How can one write a condition datetime is not NaT?

1 view (last 30 days)
How can one write a condition datetime is not NaT?

Accepted Answer

Steven Lord
Steven Lord on 19 Aug 2021
Use isnat.
T = datetime('today')
T = datetime
19-Aug-2021
isnat(T)
ans = logical
0

More Answers (1)

Oleksa_Berruk
Oleksa_Berruk on 19 Jul 2023
Edited: Oleksa_Berruk on 19 Jul 2023
https://www.mathworks.com/help/matlab/ref/datetime.isnat.html. Thank you.
Thank you a bunch!

Tags

Products


Release

R2021a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!