Re: Time-Variable
Posted in 1998
On Thu, 18 Jun 1998, Torsten Kleine Buening wrote:
> I am looking for the possibility to save a time, like '10:00:00', into my
> db, the only variables, as I know, for those questions are DateTime or
> Date, isn=B4t there a simple Time-Var?
There is, though the notation isn't all that simple:
time_col DATETIME HOUR TO SECOND
> Or how do I get rid of these stupid date at the beginning of the
> DateTime, I have to set, even if I tell the db DateTime Hour To Second.
I'm not sure what you are doing here. You can insert the value in several =
ways:
INSERT INTO SomeTable(Time_Col) VALUES('10:00:00');
INSERT INTO SomeTable(Time_Col) VALUES(DATETIME(10:00:00) HOUR TO SECOND);
> We are using Online 7.22 (Aix).
You might note that the Informix date/time types are based on a draft of
the SQL-92 standard and the final standard has a simpler set of types
(DATE, TIME, TIMESTAMP, if I recall correctly).
Yours,
Jonathan Leffler (jleffler@informix.com) #include <witticism.h>
Guardian of DBD::Informix -- see http://www.perl.com/CPAN