How to convert a column in a table to date format for plotting a time series?
Ältere Kommentare anzeigen
Dear MATLAB friends
I´m struggling with the conversion of a column to the date format. The cells in the row are written as '2012-09-01T00:00:00.000Z' . I want to convert all the cells in the column to dates that I can use for plotting a time series.
Any handy hints for this issue?
Thank you already in advance!
Regards
Tom
Akzeptierte Antwort
Weitere Antworten (1)
Eric Sofen
am 11 Dez. 2020
There's no need to replace the 'T' and 'Z' literals. Datetime formats can include literals:
datetime(Column_of_Time_Strings,'InputFormat',"yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")
Kategorien
Mehr zu Tables finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!