help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Convert Epoch Date to Serial Date


From: Richardson, Anthony
Subject: RE: Convert Epoch Date to Serial Date
Date: Wed, 10 Apr 2019 18:33:32 +0000

> Subject: Convert Epoch Date to Serial Date
> 
> I've looked thru the Octave time utilities and could not find a routine for 
> this
> purpose. Is there a simple function that receives the epoch-date and
> converts it to a serial-date. (I need to feed the latter to the datetick 
> routine)
> 
> Thanks
> Fritz

I believe localtime will return a structure that you can pull apart and feed to 
datenum to get a serial date:

>> localtime(time())
ans =

  scalar structure containing the fields:

    usec =  839628
    sec =  31
    min =  32
    hour =  13
    mday =  10
    mon =  3
    year =  119
    wday =  3
    yday =  99
    isdst =  1
    gmtoff = 0
    zone = Central Daylight Time


Tony Richardson



reply via email to

[Prev in Thread] Current Thread [Next in Thread]