Change date format in vector
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Davide Cerra
am 20 Aug. 2020
Beantwortet: Binbin Qi
am 20 Aug. 2020
Hello i would like to uniform 2 different date format in a single vector:
4/1/2019 12:45:00 AM and 15/6/19 18:10
how can i do that?
2 Kommentare
Walter Roberson
am 20 Aug. 2020
What is the data type being used? A vector of datetime only has one format associated with it.
Akzeptierte Antwort
Binbin Qi
am 20 Aug. 2020
t1 = datetime("4/1/2019 12:45:00 AM",'InputFormat',"dd/MM/yyyy HH:mm:ss a");
t2 = datetime("15/6/19 18:10",'InputFormat',"dd/MM/yy HH:mm");
t = [t1, t2]
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Dates and Time finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!