Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: trunc(sysdate) with dd-mon-rr format
In article <01bd9bca$08e92c80$b6c13cc7_at_it80>,
"Steve Pedersen" <steve_at_here.com> wrote:
>
> I have come accross an interesting problem and wondered if anyone else has
> experienced it. If the nls_date_format is set to dd-mon-rr in the init.ora
> file, then if you "select trunc(sysdate,'DD-MON-RR') from dual", it returns
> the error message ora -1898 too many precision specifiers. This is also the
> case with YYYY and YY as the year mask. As many programs use trunc
> (date_column_of_some_type), this is potentially a problem.
>
> While I would prefer to use the nls_date_format of DD-MON-YYYY, in this
> case I cannot. If anybody has had experience with this or could offer some
> insight, please email me at steve_pedersen_at_northwood.ca
>
> Thanks.
>
Hi Steve,
I think the problem is with the format model in trunc function. Regardless of the nls_date_format only one format model can be given to trunc function. In your query you have given 'DD-MON-YYYY' which is not supposed to be given as date format model in this function. You can refer SQL* Ref manual p3.41.
Hope this works.
Regards,
Saravanan
-----== Posted via Deja News, The Leader in Internet Discussion ==----- http://www.dejanews.com/ Now offering spam-free web-based newsreading Received on Mon Jun 22 1998 - 00:13:51 CDT
![]() |
![]() |