Subject Re: [firebird-support] Subtracting 3 minutes from Now
Author Martijn Tonies
Hello Grant,

> I am trying to compare 2 time stamps in order that a stored procedure
> can return a records that a re out of date.
>
> FTime= 'Now';
> FTime= :FTime - (3/1440);
>
> I am using the above to subtract 3 minutes from "Now" but it does not
> seem to be working. FTime remains as now.
>
> I checked that it was not working by outputting the value assigned to
> 'Now' and both 'Now' and FTime return the same value.
>
> What am I missing ?

Is this a dialect 3 database?

Try:

ftime = :ftime - (3.0/1440.0);

To make sure the calculation uses floats.

With regards,

Martijn Tonies
Database Workbench - tool for InterBase, Firebird, MySQL, Oracle & MS SQL
Server
Upscene Productions
http://www.upscene.com