필터 지우기
필터 지우기

conversion of hexadecimal timestamps

조회 수: 10 (최근 30일)
peter
peter 2016년 8월 2일
댓글: peter 2016년 8월 2일
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