Subject Re: [Firebird-Architect] Extract / Cast Datetime
Author Dmitry Yemanov
"Ian A. Newby" <iann@...> wrote:
>
> Why can't you use extract(date from mytimestamp) or extract(time from
> mytimestamp)?

Because the SQL standard says so.

> I know you can get around it by using cast(mytimestamp) as date etc

Exactly.

> but this doesn't work in dialect 1.

Because it knows nothing about DATE/TIME datatypes.

> Also I would expect extract to be
> able to do it, as date and time are both parts of a timestamp.

What you want is not to extract a date from a timestamp but to zero the time
portion of it. This is not what EXTRACT is intended to do, sorry. I may only
suggest to use an UDF for this purpose.

> One other thing regarding extract, it would be nice to be able to
> extract the ISO week number.

SF #1225686.


Dmitry