Subject | Re: [ib-support] How can I convert TIMESTAMP to DOUBLE PRECISION??? |
---|---|
Author | lester@lsces.co.uk |
Post date | 2002-02-16T15:21Z |
> > UPDATE TABLE SET FIELD1 = 'NOW' + 10 will give you ten daysMy point was that you can just treat timestamps as numbers
> > time.
>
> No, it will give you a timestamp which is ten days in the future. I hope
> you see the difference.
when you want to use them like that. The problem I see is
that intermediate code can convert them to any format of
date or time layout - but for my applications I don't need (
or want ) a conversion from the internal number. In most
cases I am looking for the duration since the last event, or
the number of days since a last visit.
> > select FIELD1 from TABLE into :FLOATThe remaining problem is that the reasonable printed
> >
> > will give you a number but the conversion to text happens
> > automatically.
>
> Torturing the figures to have them match the theory? ;-)
> Your select will give you a result of the type of TABLE.FIELD1; if it's
> a date/time/timestamp you don't see the conversion of it to a string,
> just the only reasonable printed representation for it (in no case
> should you see 3045.533).
representation may not be what is wanted. If you are doing
calculations on the dates or times, you want the numbers.
The only 'mistake' I made was I did not ask - "What is the
correct way to get the number when that is what we actually
want?"
--
Lester Caine
-----------------------------
L.S.Caine Electronic Services