Subject | Re: [firebird-support] time subtraction problem |
---|---|
Author | jft |
Post date | 2008-10-08T04:01:15Z |
Martin,
Either the FLOOR or the TRUNCATE function should help - try these in iSQL:
select truncate(cast(240.7960 as decimal(9,4) from rdb$database; or
select floor(cast(240.7960 as decimal(9,4) from rdb$database;
HTH,
John
Either the FLOOR or the TRUNCATE function should help - try these in iSQL:
select truncate(cast(240.7960 as decimal(9,4) from rdb$database; or
select floor(cast(240.7960 as decimal(9,4) from rdb$database;
HTH,
John
> -------Original Message-------
> From: martinthrelly <martinthrelly@...>
> Subject: [firebird-support] time subtraction problem
> i have 2 times stored in the database and i want to subtract them. but
> i want to ignore the hundredths of the second.
>
> var_start_time = 16:06:00
> var_end_time = 16:10:00
> declare variable var_seconds decimal(9,4);
> var_seconds = var_end_time - var_start_time;
> this is giving me a value of 240.7960 which is because it is taking
> the hundredths of a second into account.
> what i want to get here is 240 flat.