Date Disparity

From: Jared Still <jkstill_at_gmail.com>
Date: Tue, 16 Feb 2010 13:47:34 -0800
Message-ID: <bf46381002161347y5b32c02cnd4cd8157eb1bb7c6_at_mail.gmail.com>



Anyone else see a problem with this:

  1 select trunc(sysdate,'W'), to_char(trunc(sysdate,'W'),'d')   2* from dual
13:46:46 ordevdb01.radisys.com - js001292_at_dv11 SQL> /

TRUNC(SYSDATE,'W') T
------------------- -

02/15/2010 00:00:00 2

1 row selected.

ie. the first day of the week as per trunc() is the second day of the work as per to_char()

Jared Still
Certifiable Oracle DBA and Part Time Perl Evangelist Oracle Blog: http://jkstill.blogspot.com Home Page: http://jaredstill.com

--

http://www.freelists.org/webpage/oracle-l Received on Tue Feb 16 2010 - 15:47:34 CST

Original text of this message