RE: SQL question
Posted in 2001
Not that difficult, except for the 'seconds' requirement. Are you using a procedural language? You could do: DEFINE sec INTERVAL SECOND TO SECOND(9) LET sec=dtm1-dtm2 You will get an interval when you subtract one from another anyway - your other option (from SQL) is to do the subtraction, pop the results into a table, and parse the data coming out of the table. No I don't have a function handy. cheers j. > -----Original Message----- > From: Five Cats [mailto:cats_five@hotmail.com] > Sent: Monday, February 05, 2001 5:47 AM > To: informix-list@iiug.org > Subject: SQL question > > > > I need an SQL to subtract one datetime field from another and give the > answer in seconds. I've tried without success - I'm sure: > > a) it's very easy > > and > > b) some kind person out there knows how to do this! > > TIA > > -- > Surfer! My return is address at Hotmail. > If you really want to send me email then use: > surfer at > nevis-view dot > demon dot co dot uk > "I can resist anything but temptation" - Oscar Wilde ;-) >