convert timestamp include hours,minuts,second to real date
古いコメントを表示
*hi,
how convert this timestamp into real date?
ex.
1162160236000
datester, datenum do not work with it.
thanks in advance*
6 件のコメント
per isakson
2013 年 3 月 30 日
Why do you believe this is a timestamp?
Walter Roberson
2013 年 3 月 30 日
Is that a string or an integer? How does the number break down into hours, minutes, and seconds?
huda nawaf
2013 年 3 月 30 日
Walter Roberson
2013 年 3 月 30 日
Does that number represent 27-Oct-2006 22:17:16 ?
huda nawaf
2013 年 3 月 30 日
huda nawaf
2013 年 3 月 30 日
回答 (1 件)
Walter Roberson
2013 年 3 月 30 日
29th instead of 27th? Sorry I cannot explain that one. If you had said 9 days after the 27th then I could have guessed that leap years were not being taken into account, but a difference of exactly 2 days does not make any sense to me.
The conversion I did was
TS = 1162160236000;
datestr(datevec(TS/60/60/24/1000) + [1970 0 0 0 0 0])
The 1970 is in accordance with the Unix time convention of using time since the beginning of 1970.
If the difference had been 12 to 13 days, it could have represented an adjustment for the years ending in 00 not being leap years unless they were also divisible by 400. But 2 days off, I am at a loss for.
カテゴリ
ヘルプ センター および File Exchange で Time Series Objects についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!