Subject Re: [firebird-support] There is a way to format datetime directly in SQL ?
Author Matthias Hanft
Huan Ruan wrote:
>
> select
> extract(year from current_date) || '-' ||
> lpad(extract(month from current_date), 2, '0') || '-' ||
> extract(day from current_date)
> from rdb$database

Is this an "atomic" operation? If not, it would not work correctly
if, for example, the first two "current_date" would be executed at
23:59:59.999 and the third "current_date" at 00:00:00.001.

Of course, this is not a problem if you extract the data from a
normal database date type field instead of "current_time".

-Matt