MATLAB Answers

huda nawaf

how deal with time stamp with unix seconds?

Asked by huda nawaf
on 26 May 2012

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

thanks in advance




No products are associated with this question.

1 Answer

Answer by James Tursa
on 26 May 2012
 Accepted answer

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.


now hoe get just 04-Dec-1997?

datestr(floor(881250949/86400 + datenum('1/1/1970')))

Join the 15-year community celebration.

Play games and win prizes!

Learn more
Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

MATLAB Academy

New to MATLAB?

Learn MATLAB today!