MORE ON DATE/TIME
Posted in 1999
Topics: Versions, Editions & End-of-Life
Hello, I still have problems with date/time: How can I do this? define currentTime CHAR(8); let currentTime = to_char(CURRENT,[format for having hhhhmmss]); OR, at least, let hours = HOUR(CURRENT); let min = MINUTE(CURRENT); let secs = SECONDS(CURRENT); let currentTime = hours || min || secs; Thanks, Aurelio These functions doesn't exist, but are there others? (IDS 7.3)
Aurelio wrote: > I still have problems with date/time: > > How can I do this? > define currentTime CHAR(8); > let currentTime = to_char(CURRENT,[format for having hhhhmmss]); In SQL, I suspect you can't, though I'm not sure exactly what facilities are available with the 7.3 TO_CHAR() function. > OR, at least, > > let hours = HOUR(CURRENT); LET hh = CURRENT HOUR TO HOUR Or, more generally, LET hh = EXTEND(dt_val, HOUR TO HOUR) > let min = MINUTE(CURRENT); > let secs = SECONDS(CURRENT); > > let currentTime = hours || min || secs; > > Thanks, > Aurelio > > These functions doesn't exist, but are there others? (IDS 7.3) -- Jonathan Leffler (jleffler@informix.com, jleffler@earthlink.net) Guardian of DBD::Informix v0.60 -- see http://www.perl.com/CPAN #include <disclaimer.h>