how deal with time stamp with unix seconds?

조회 수: 1 (최근 30일)
huda nawaf
huda nawaf 2012년 5월 26일
hi, I got dataste has time stamp with unix seconds since 1/1/1970 UTC ex. this no. 881250949 is date ,but I do not know which date. are there function in matlab deal with such time stamp?
I visited this link about it , but not get what I need http://www.mathworks.com/matlabcentral/newsreader/view_thread/93932
thanks in advance

채택된 답변

James Tursa
James Tursa 2012년 5월 26일
Everything you need is in the link you provided. E.g.,
>> datestr(881250949/86400 + datenum('1/1/1970'))
ans =
04-Dec-1997 15:55:49
This would be UTC, not accounting for leap seconds.
  댓글 수: 2
huda nawaf
huda nawaf 2012년 5월 26일
thanks,
now hoe get just 04-Dec-1997?
James Tursa
James Tursa 2012년 5월 26일
datestr(floor(881250949/86400 + datenum('1/1/1970')))

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

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