Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: TO_CHAR bug?
suvinay wrote:
> Hi,
> In a few databases, the following statements results in a missing "Z"
> at the end?
> A bug?
>
>
> SQL> select TO_CHAR(systimestamp, 'YYYY-MM-DD"T"HH24:MI:SS.FF2"Z"')
> from dual;
>
> TO_CHAR(SYSTIMESTAMP,'YYYY-MM-
> ------------------------------
> 2006-07-21T15:52:36.09
>
> //--- where is "Z" at the end?
>
> If I give two space in "Z{space}{space}" as "Z ", it works
>
> SQL> select TO_CHAR(systimestamp, 'YYYY-MM-DD"T"HH24:MI:SS.FF2"Z "')
> from dual;
>
> TO_CHAR(SYSTIMESTAMP,'YYYY-MM-DD
> --------------------------------
> 2006-07-21T15:07:29.14Z
>
>
> Help appreciated very much.
>
> Thanks.
> -- Suvinay
>
Platform/version? What distinguishes databases that reproduce the problem from those that don't?
Short answer: maybe. However, TFM states "The total length of a datetime format model cannot exceed 22 characters" and yours do, so does it work ok if you split it and concatenate the results? Received on Mon Jul 24 2006 - 08:46:27 CDT