Re: Julian day to Informix date conversion
Posted in 1998
>From: pygk@my-dejanews.com >Newsgroups: comp.databases.informix >Subject: Julian day to Informix date conversion >Date: Fri, 30 Oct 1998 21:06:39 GMT > >Are there any 4gl/C routines that convert a Julian day to mm/dd/yyyy >format? > >Example: Julian date = 2451117 -> 10/30/1998 Since Informix stores 30th October 1998 internally as 36097, you should be able to map between Julian and Informix dates by subtracting 2415020 (= 2451117 - 36097) from the Julian date, or convert from Informix to Julian date by adding that value to an Informix date (though you'd probably need to ensure that the result was an integer and not a date!). >I would also like to know if there are any routines that convert a >Julian date in the ccyyddd format to the mm/dd/yyyy format. I posted a stored procedure to handle the ccyyddd (aka yyyyddd) to date conversion last week. If it isn't still available on your news server, go to Dejanews to find it. Yours, Jonathan Leffler (jleffler@informix.com) #include <witticism.h> Guardian of DBD::Informix v0.60 -- http://www.perl.com/CPAN Informix IDN for D4GL & Linux -- http://www.informix.com/idn