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?

 采纳的回答

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

3 个评论

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')

请先登录,再进行评论。

更多回答(0 个)

类别

帮助中心File Exchange 中查找有关 Dates and Time 的更多信息

产品

标签

Community Treasure Hunt

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

Start Hunting!

Translated by