RE: Difference between two DATETIME fields
Posted in 1998
Assume the two columns are dtime1 and dtime2. The difference should be retrievable using: SELECT DATE(dtime2) - DATE(dtime1) AS diff_in_days FROM SomeTable WHERE ... I've not formally tested this code this morning, so there could be a typo or worse in it. Yours, Jonathan Leffler (jleffler@visa.com) #include <succinctness.h> ---------- From: BADA7838@chollian.dacom.co.kr[SMTP:BADA7838@chollian.dacom.co.kr] Sent: Sunday, February 15, 1998 11:03 PM To: informix-list@iiug.org Subject: Re: Difference between two DATETIME fields Ronnie Diaz (ronnie_diaz@appsig.com) wrote: : I have two DATETIME fields, and I want to know the number of days : between the two dates. Is there a simple SELECT statement I can use to : get that?