Re: Time-Variable
Posted in 1998
Jonathan Leffler wrote:
>
> 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
You do recall correctly. There is a further twist which Informix do not
yet implement: TIME and TIMESTAMP may also come WITH TIMEZONE. Quite
important for global businesses, possibly even for the USA ;-).
--
Peter Lancashire
Information Systems Specialist, Bayer plc
Eastern Way, Bury St Edmunds, Suffolk, IP32 7AH, UK
Tel: +44-1635-562258, Fax: +44-1635-562281
Mail: Peter.Lancashire.PL1@bayer.co.uk
---
My Internet plumbing does not allow me to mail and post news together.
Sorry.
All opinions are my own and not those of Bayer plc.
---
Join Infuse, the UK Informix User Group at http://www.infuse.org.uk/