Subject | Re: [firebird-support] Current date via database query |
---|---|
Author | Milan Babuskov |
Post date | 2003-11-04T15:15:02Z |
Daniel wrote:
select current_date from rdb$database;
or
select current_timestamp from rdb$database;
rdb$database is just one of the system tables, that has exactly one row,
so it's convenient for this. Of course, you could select from any other
table.
--
Milan Babuskov
http://fbexport.sourceforge.net
> How can I get the current date via a database query?Try this:
>
> 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 from rdb$database;
or
select current_timestamp from rdb$database;
rdb$database is just one of the system tables, that has exactly one row,
so it's convenient for this. Of course, you could select from any other
table.
--
Milan Babuskov
http://fbexport.sourceforge.net