Subject | Re: [firebird-support] Date functions |
---|---|
Author | Ann W. Harrison |
Post date | 2005-10-12T15:44:59Z |
reinaldo_mra wrote:
hours:
select * from table
where timestampcolumn <=
cast ('now' as timestamp) + (5.00 / 24.00)
days:
select * from table
where timestampcolumn <=
cast ('now' as timestamp) + (5.00)
months is tricky, since they're variable legth
select * from table
where timestampcolumn <=
cast ('now' as timestamp) + (5.00 * 365.0/12.0)
Regards
Ann
> I did not find any function to add a value to a timestamp column. I needIn inverse order...
> something like that:
>
> SELECT * FROM Table WHERE TimeStampColumn<=AddMonth( NOW, 5)
> SELECT * FROM Table WHERE TimeStampColumn<=AddDay( NOW, 5)
> SELECT * FROM Table WHERE TimeStampColumn<=AddHour( NOW, 5)
>
hours:
select * from table
where timestampcolumn <=
cast ('now' as timestamp) + (5.00 / 24.00)
days:
select * from table
where timestampcolumn <=
cast ('now' as timestamp) + (5.00)
months is tricky, since they're variable legth
select * from table
where timestampcolumn <=
cast ('now' as timestamp) + (5.00 * 365.0/12.0)
Regards
Ann