Is there an easy way (m-file if available) to convert the Unix time
(ex.: 985944523) to the Matlab time format?
Thanks for your help.
Michel
"Michel Guillemette" <mgui...@foxboro.ca> wrote in message
news:dy2uxg...@forum.mathforum.com...
usage:
ml_tics = tconv(unix_tics);
datestr(ml_tics)
e.g:
datestr(tconv(0))
31-Dec-1969 19:00:00 % EST/GMT
% note: you will have to adjust the time-zone accordingly!
us
> Is there an easy way (m-file if available) to convert the Unix
> time (ex.: 985944523) to the Matlab time format?
If `n' is the number of seconds since the epoch (assuming the
epoch was at 1970-1-1 00:00), you can use
datevec(datenum(1970,1,1) + n/86400)
Replace `datevec' with `datestr' if you want some other kind of
date formatting.
Peter
--
Er manni betra gott hjarta en hvasst sverš.