[Thread Prev][Thread Next][Index]

Re: [ferret_users] how to convert julian dates in to yy,mm,dd when reference time is different



Hi,
Is the data on a standard calendar, or does the time axis have a calendar=Julian attribute?  Assuming it does not have a Julian calendar attribute but is just on Ferret's default calendar, then all you need to do is adjust by the number of days from 1-jan-1900 to 1-jan-1992.  You could use Ferret to define a daily time axis spanning those dates and see how long it is, but it's even easier than that:

yes? show func *1900*

you'll see there's a function already:
DATE1900(formatted date)
    Convert a date into Julian days since 1-Jan-1900
    formatted date: dd-MMM-yy or dd-MMM-yyyy  (e.g. "20-Dec-00") (none) (STRING)

So, if your time variable with days since 1992 is t1992, you can

yes? let many_days =  date1900("1-jan-1992")
yes? list DAYS1900TOYMDHMS(t1992 + many_days)

(Or is it   (t1992 + many_days - 1)?  You should check my logic there. )


-Ansley

On 7/16/2013 10:28 AM, golla nageswararao wrote:
Hi all,
 I am having some set of julian dates referenced to 01 January 1992. How can I convert into year, month, second since days1900toyymmddhhss command is referenced to 01 january 1900 ?

Thanks in advance.

--
With Best regards,
G.NageswaraRao,


[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce / NOAA / OAR / PMEL / Ferret

Privacy Policy | Disclaimer | Accessibility Statement