Subject Re: [ib-support] How can I convert TIMESTAMP to DOUBLE PRECISION???
Author Vinicius
I need to know if one date that I pass to a stored procedure is more nearest
from wich date at the date in the database, how can I do this?

I have make with a FOR SELECT and calculatin the diference of dates, but I
need to remove the signal ...

Vinicius

<lester@...> escreveu na mensagem
news:3C6D7A40.F45C6B74@......
> > 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
>
> To unsubscribe from this group, send an email to:
> ib-support-unsubscribe@egroups.com
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>