Path: utzoo!attcan!uunet!unsvax!jimi!magic!ray From: ray@magic.cs.unlv.edu (Ray Tripamer) Newsgroups: comp.databases Subject: Re: Dates and INFORMIX Message-ID: <2074@jimi.cs.unlv.edu> Date: 12 Oct 90 15:40:01 GMT References: <1990Oct11.060258.280@monu6.cc.monash.edu.au> Sender: news@jimi.cs.unlv.edu Reply-To: ray@jimi.cs.unlv.edu (Ray Tripamer) Organization: University of Nevada, Las Vegas Lines: 22 In article <1990Oct11.060258.280@monu6.cc.monash.edu.au> edd842c@monu6.cc.monash.edu.au (j.e. 8842141 osborn) writes: >I have a question regarding the computation of the number of >days between dates in Informix. > >eg. The number of days between 10-10-90 and 12-11-90 > >I have searched through the manuals and can't find any Jullian >Date functions etc. Informix dates are stored internally as integers. Specifically (from the Informix-SQL Reference Manual V2.10) Informix "stores a DATE value as an integer whose value is the December 31, 1899". Therefore all you need to do to get the number of dates is to subtract the two date fields, i.e. (in an ACE report): PRINT date1-date2; where "date1" and "date2" are two date fields from the select statement. -- Ray Tripamer ray@jimi.cs.unlv.edu