Transform into a Matlab datetime format

I have an entry "2017-10-26 06-PM" How can I transform this entry into a datetime format that Matlab can understand?

 Akzeptierte Antwort

Sean de Wolski
Sean de Wolski am 14 Jun. 2018
Bearbeitet: Sean de Wolski am 14 Jun. 2018

0 Stimmen

datetime("2017-10-26 06-PM",'InputFormat','yyyy-MM-dd hh-aa')

3 Kommentare

alpedhuez
alpedhuez am 14 Jun. 2018
Thank you. I have a table A with the entries of the first column are of the format "2017-10-26 06-PM." How can I transform this first column into datetime format?
exactly the same way:
yourtable.columnname = datetime(yourtable.columname, 'InputFormat', 'yyyy-MM-dd hh-aa')
alpedhuez
alpedhuez am 14 Jun. 2018
Great help.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Startup and Shutdown finden Sie in Hilfe-Center und File Exchange

Produkte

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by