Effacer les filtres
Effacer les filtres

conversion of hexadecimal timestamps

10 vues (au cours des 30 derniers jours)
peter
peter le 2 Août 2016
Commenté : peter le 2 Août 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?

Réponse acceptée

Stephen23
Stephen23 le 2 Août 2016
Modifié(e) : Stephen23 le 2 Août 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.

Plus de réponses (1)

Azzi Abdelmalek
Azzi Abdelmalek le 2 Août 2016
Modifié(e) : Azzi Abdelmalek le 2 Août 2016
use hex2dec command
a='10'
b=hex2dec(a)
  3 commentaires
Azzi Abdelmalek
Azzi Abdelmalek le 2 Août 2016
How your hexadecimal number is related to your date?
peter
peter le 2 Août 2016
the hexadecimal timestamp is generated automatically, presumably it is a unix feature.

Connectez-vous pour commenter.

Catégories

En savoir plus sur Dates and Time dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by