Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: TO_CHAR bug?

Re: TO_CHAR bug?

From: Dave <solomons_dad.w.marks_and_whom_at_oracle.com>
Date: Mon, 24 Jul 2006 14:46:27 +0100
Message-ID: <it4xg.34$jI1.80@news.oracle.com>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US