Datetime shows month name and not number

19 views (last 30 days)
Tiago Dias
Tiago Dias on 16 Aug 2019
Commented: madhan ravi on 16 Aug 2019
I want to find a specific datetime in my vector full of date time in the format of (10-09-2018 00:00:00) days-month-year hour-minute-second
I want to find this time:
datetime('10-09-2018 00:00:00','InputFormat','dd-MM-uuuu HH:mm:ss')
But matlab assume the 09 to be september and I need to be 09, because my vector has numbers for the months and not the short name
ans =
10-Sep-2018 00:00:00
Thanks for your time

Accepted Answer

madhan ravi
madhan ravi on 16 Aug 2019
Change InputFormat to Format.

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!