How to convert a char into datetime variable?
7 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Marianna Pizzo
am 21 Mär. 2019
Kommentiert: Marianna Pizzo
am 21 Mär. 2019
Hello, how can I convert a char such as '11:04:55' to datetime variable?
Thank you very much.
0 Kommentare
Akzeptierte Antwort
Guillaume
am 21 Mär. 2019
datetime('11:04:55')
Note that it will use the current date for the date part (since a datetime is always date + time as the name indicates). If you do not want the date to display (it will still be stored and can be accessed):
datetime('11:04:55', 'Format', 'HH:mm:ss')
duation('11:04:55')
Just as easy.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Data Type Conversion 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!