datetime format with T time demarcation
古いコメントを表示
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 件のコメント
dt1 = datetime(2023,8,1,11,07,56, "Format","yyyy-MM-dd'T'HH:mm:ss")
dt2 = dt1 + minutes(1)
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Data Type Conversion についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!