How to reverse datenum?
Show older comments
SOS: How to convert serial date number back to date, in the format of mm/dd/yyyy?
Thanks SO MUCH!!
Accepted Answer
More Answers (2)
Walter Roberson
on 16 Jun 2011
datestr(serialnum, 'MM/DD/YYYY')
2 Comments
Zoe
on 16 Jun 2011
George Scott
on 17 Jul 2018
'mm/dd/YYYY' ('MM' is a minutes format, not months)
Peter Perkins
on 3 Aug 2018
0 votes
The longer answer is, Don't use datenum and datestr at all if you can avoid it. Use datetime, no conversion back and forth between number and text necessary.
Categories
Find more on Dates and Time in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!