Filter löschen
Filter löschen

conversion of hexadecimal timestamps

10 Ansichten (letzte 30 Tage)
peter
peter am 2 Aug. 2016
Kommentiert: peter am 2 Aug. 2016
I have dates and times as hexadecimal timestamps. I want to convert them into date vectors or the like. Is there a way to do this in Matlab?

Akzeptierte Antwort

Stephen23
Stephen23 am 2 Aug. 2016
Bearbeitet: Stephen23 am 2 Aug. 2016
>> datevec(hex2dec('577aaa0e')/86400 + datenum(1970,1,1))
ans =
2016 7 4 18 25 18
The HEX date likely encodes a UNIX timestamp, if so the above conversion will convert this into a MATLAB datevec.

Weitere Antworten (1)

Azzi Abdelmalek
Azzi Abdelmalek am 2 Aug. 2016
Bearbeitet: Azzi Abdelmalek am 2 Aug. 2016
use hex2dec command
a='10'
b=hex2dec(a)
  3 Kommentare
Azzi Abdelmalek
Azzi Abdelmalek am 2 Aug. 2016
How your hexadecimal number is related to your date?
peter
peter am 2 Aug. 2016
the hexadecimal timestamp is generated automatically, presumably it is a unix feature.

Melden Sie sich an, um zu kommentieren.

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