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: Date Question

Re: Date Question

From: wrgptfan <wrgptfan_at_hotmail.com>
Date: 21 Mar 2006 13:57:15 -0800
Message-ID: <1142978235.634647.140540@i39g2000cwa.googlegroups.com>

Anurag Varma wrote:
> I don't think he is referring to the year zero problem.
> He seems to be getting the following date when using sqlplus:
> 00-00-0000 00 00:00:00
>

Yes, that is the problem to which I was referring. In fact, using this version of SQLPLUS, I get the same date for any day that would be in Oracle year 0.

SQL> select to_char(trunc(sysdate)-732392, 'dd-mon-yyyy AD') from dual;

TO_CHAR(TRUNC(



01-jan-0001 AD

SQL> select to_char(trunc(sysdate)-732393, 'dd-mon-yyyy AD') from dual;

TO_CHAR(TRUNC(



00-000-0000 00

SQL>
> while he gets the right date back when using pl/sql.
>
> I for one am not able to reproduce this issue in 9.2.0.6.
>
> ORA92> select to_char((trunc(sysdate)-732757),'DD-MM-YYYY AD
> HH24:MI:SS')
> from dual; 2
>
> TO_CHAR((TRUNC(SYSDATE)-732757
> ---------------------------------------------------------------------------
> 02-01-0000 AD 00:00:00
>
>
> Maybe its a bug .. and requires a patch.
>
> Anurag
Received on Tue Mar 21 2006 - 15:57:15 CST

Original text of this message

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