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

Home -> Community -> Usenet -> c.d.o.server -> SQL incorrectly truncates IW dates in Oracle 7.3.4

SQL incorrectly truncates IW dates in Oracle 7.3.4

From: Brad Slocomb <bslocomb_at_wconper1.telstra.com.au>
Date: Wed, 25 Nov 1998 10:21:28 +0800
Message-ID: <73fpj7$6nn$1@cdn-news.telecom.com.au>


Hello,

Why does "select trunc(to_date('28-NOV-98','DD-MON-YY'),'IW') from dual" return 30-NOV-98 under Oracle 7.3.4 (not so for 7.3.2 or 7.2.3)?

The error occurs with the trunc of any Saturday date using the IW format. The above query run with dates of 27-NOV-98 and 29-NOV-98 returns 23-NOV-98 as one would expect.

I have tested this under 7.3.4.0 and 7.3.4.3, and on different instances running
on both HP-UX and Solaris servers.

I rely on the IW format for generating weekly reports on a Mon-Sun basis. The error means the query results that are being returned are most likely incorrect, i.e. if the rows being grouped includes Saturdays.

Is this a bug or have I missed something?

Thanks,
Brad Received on Tue Nov 24 1998 - 20:21:28 CST

Original text of this message

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