Subject | Re: How to select records more than one hour old |
---|---|
Author | Dimitrios Chr. Ioannidis |
Post date | 2004-05-04T16:45:04Z |
--- In firebird-support@yahoogroups.com, "Michael L. Horne"
<guardian@p...> wrote:
if fDate is timestamp try something like
select * from file
where fDate < ( current_timestamp - (Cast('1' as numeric(18,9)) /
24) )
I use that syntax cause i want to use parameters sometimes,
something like
select * from file
where fDate < ( current_timestamp - (Cast(:Hour as numeric(18,9)) /
24) )
Regards,
--
Dimitrios Chr. Ioannidis
<guardian@p...> wrote:
> Hello,string "now""
>
> I need a select that can return all records
> more than one hour old.
>
> Firebird 1.5 dilect 1
>
> I tried
> select * from file
> where fDate < cast('now' - (1/24) as date)
> but I get "Overflow occurred during data type conversion from
if fDate is timestamp try something like
select * from file
where fDate < ( current_timestamp - (Cast('1' as numeric(18,9)) /
24) )
I use that syntax cause i want to use parameters sometimes,
something like
select * from file
where fDate < ( current_timestamp - (Cast(:Hour as numeric(18,9)) /
24) )
Regards,
--
Dimitrios Chr. Ioannidis