Subject Re: [firebird-support] Current date via database query
Author Milan Babuskov
Daniel wrote:
> 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?

Try this:

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