conversion of hexadecimal timestamps

10 次查看(过去 30 天)
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?

采纳的回答

Stephen23
Stephen23 2016-8-2
编辑:Stephen23 2016-8-2
>> 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.

更多回答(1 个)

Azzi Abdelmalek
Azzi Abdelmalek 2016-8-2
编辑:Azzi Abdelmalek 2016-8-2
use hex2dec command
a='10'
b=hex2dec(a)
  3 个评论
Azzi Abdelmalek
Azzi Abdelmalek 2016-8-2
How your hexadecimal number is related to your date?
peter
peter 2016-8-2
the hexadecimal timestamp is generated automatically, presumably it is a unix feature.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Dates and Time 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by