Subject | Re: [Firebird-Architect] Extract / Cast Datetime |
---|---|
Author | Dmitry Yemanov |
Post date | 2006-02-11T06:54:23Z |
"Ian A. Newby" <iann@...> wrote:
portion of it. This is not what EXTRACT is intended to do, sorry. I may only
suggest to use an UDF for this purpose.
Dmitry
>Because the SQL standard says so.
> Why can't you use extract(date from mytimestamp) or extract(time from
> mytimestamp)?
> I know you can get around it by using cast(mytimestamp) as date etcExactly.
> but this doesn't work in dialect 1.Because it knows nothing about DATE/TIME datatypes.
> Also I would expect extract to beWhat you want is not to extract a date from a timestamp but to zero the time
> able to do it, as date and time are both parts of a timestamp.
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 toSF #1225686.
> extract the ISO week number.
Dmitry