Subject | Re: [firebird-support] Current date via database query |
---|---|
Author | Helen Borrie |
Post date | 2003-11-04T14:25:43Z |
At 04:15 PM 4/11/2003 +0200, you wrote:
select current_date as whatever_you_like from rdb$database (date only)
select current_timestamp as whatever_you_like from rdb$database (date and
time)
select cast('today' as date) as whatever_you_like from rdb$database (date
only)
select cast ('now' as timestamp) as whatever_you_like from rdb$database
(date and time)
also
select cast('yesterday' as date) ....
select cast('tomorrow' as date) ...
heLen
>HiSeveral.
>
>How can I get the current date via a database query?
>
>In a Sybase database it would be >>> select 'today' = getDate() <<< and in
>a SAP database it would be >>> select {fn NOW()} from DumyTable <<<
>
>What is the equivalent in Firebird?
select current_date as whatever_you_like from rdb$database (date only)
select current_timestamp as whatever_you_like from rdb$database (date and
time)
select cast('today' as date) as whatever_you_like from rdb$database (date
only)
select cast ('now' as timestamp) as whatever_you_like from rdb$database
(date and time)
also
select cast('yesterday' as date) ....
select cast('tomorrow' as date) ...
heLen