Subject Re: [ib-support] How can I convert TIMESTAMP to DOUBLE PRECISION???
Author lester@lsces.co.uk
> It could be just me, but I still don't get it.
> How can you possibly do math operations on a value that is not a number?

DATE, TIME and TIMESTAMP ARE JUST NUMBERS.

> What would be the float equivalent of today's noon, for example?

34000.5 ( I gested the date bit <g> )

> What that of Wednesday morning, 3 AM?

3 / 24

> Perhaps you are confusing with Delphi's TDateTime (which stores a date
> and time in a Double variable)?
> Still puzzled...

The answer is that internally, calculations work.

UPDATE TABLE SET FIELD1 = 'NOW' + 10 will give you ten days
time.

select FIELD1 from TABLE into :FLOAT

will give you a number but the conversion to text happens
automatically.

Where are you planning on using the result? That will
determine how to transfer it, and a TDateTime variable may
be the answer.

--
Lester Caine
-----------------------------
L.S.Caine Electronic Services