RE: datetime question
Posted in 2007
I seem to remember that you can put it into a char, then from there into an integer. j. -----Original Message----- From: informix-list-bounces@iiug.org [mailto:informix-list-bounces@iiug.org]On Behalf Of Bill64bits Sent: Thursday, January 18, 2007 1:15 PM To: informix-list@iiug.org Subject: datetime question I have a table that has these columns (among others) start_time datetime year to second end time datetime year to second I've always wanted to just select number of elapsed seconds in straight sql but have never figured it out. I thought a cast might work, as in: ( extend(complete_time,year to fraction) - extend(start_time,year to fraction) )::interval minute(5) to second(2) but that throws a syntax error. When you do it without the cast, you get ugly stuff like 0 00:00:16.000 (for 16 seconds). Is there no way to just get total seconds without C++, Perl, etc ?