Subject | Re: [firebird-support] There is a way to format datetime directly in SQL ? |
---|---|
Author | Matthias Hanft |
Post date | 2012-05-17T10:14:05Z |
Huan Ruan wrote:
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
>Is this an "atomic" operation? If not, it would not work correctly
> select
> extract(year from current_date) || '-' ||
> lpad(extract(month from current_date), 2, '0') || '-' ||
> extract(day from current_date)
> from rdb$database
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