datetime format with T time demarcation
Mostra commenti meno recenti
I have data that I've read in with datetime format that includes a T such as:
>> ais_data.BaseDateTime(3)
ans =
datetime
2023-08-01T11:07:56
If I change the value, how do I format the answer. For example, I would like to increment the minute, like such 2023-08-01T11:08:56
However, this results in the following error
>> datetime(2023-08-01T11:08:56)
datetime(2023-08-01T11:08:56)
↑
Error: Unexpected 'T11'. Check for missing multiplication operator.
How do make a datetime number like the one I'm seeing in the example at the top?
1 Commento
dt1 = datetime(2023,8,1,11,07,56, "Format","yyyy-MM-dd'T'HH:mm:ss")
dt2 = dt1 + minutes(1)
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Data Type Conversion in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!