Borrar filtros
Borrar filtros

conversion of hexadecimal timestamps

10 visualizaciones (últimos 30 días)
peter
peter el 2 de Ag. de 2016
Comentada: peter el 2 de Ag. de 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?

Respuesta aceptada

Stephen23
Stephen23 el 2 de Ag. de 2016
Editada: Stephen23 el 2 de Ag. de 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.

Más respuestas (1)

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

Iniciar sesión para comentar.

Categorías

Más información sobre Dates and Time en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by