From: Joseph on
To convert from Unix time to Matlab, use the following:

datenum([1970 1 1 0 0 unix_time])

where unix_time is the unix timestamp. This works quickly
and consistantly for me!

Joe



"Makarand Vaidya" <makarand.vaidya(a)onetick.com> wrote in
message <foa1pb$aq1$1(a)fred.mathworks.com>...
> Hi,
>
> I need to convert Unix time to datenum format in a mex
> function. I used mexCallMATLAB to call datenum function
> but this is very slow.
>
> Is there any efficient way to do this ?
>
> Thanks
> -Makarand