Converting epoch time number to date/time

15 Ansichten (letzte 30 Tage)
aforb
aforb am 28 Sep. 2017
Kommentiert: aforb am 28 Sep. 2017
Hi
I am trying to change my epoch time back to a readable string to use in a plot. I have converted from a string to a number with the epoch of 01-01-1970 00:00:00 (dd-mm-yyyy HH:MM:SS)
I have an output such as 1470144960.
I have tried
datestr(1470144960,'dd.mm.yyyy HH:MM:SS')
ans = '09.03.5120 00:00:00'
This is not correct Any tips would be very helpful
Thanks
  1 Kommentar
aforb
aforb am 28 Sep. 2017
Nevermind I figured it out
datetime(1470144960, 'convertfrom','posixtime')

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Dates and Time finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by