I've a sequence of UNIX timestamps in milliseconds (e.g. 1491009470000). I want to convert them to human time in the format year-month-date-hour-minute-second (or in an array of these components). Following , I tried datestr: dt = datestr(1491009470000,'mmmm dd, yyyy HH:MM:SS'), only to have the error:
Error using dateformverify (line 28) DATESTR failed converting date number to date vector. Error in datestr (line 194) S = dateformverify(dtnumber, dateformstr, islocal); Caused by: Error using datevecmx Date number out of range.
Unfortunately, datevecmx doesn't seem to have a documentation in MATLAB 2014a.
However, datestr(now,'mmmm dd, yyyy HH:MM:SS.FFF AM') gives us just what we need. So, how do I get the datestr (or any other MATLAB command) to give us the human time? Thanks in advance!
8 Reset to default