Re: Date rounding problem

From: Jonathan Lewis <jonathan_at_jlcomp.demon.co.uk>
Date: Fri, 5 Apr 2013 21:24:34 +0100
Message-ID: <c7udnfYcz9Rmr8LMnZ2dnUVZ7tudnZ2d_at_bt.com>


"Syltrem" <syltremzulu_at_videotron.ca> wrote in message news:ii8ul8tnjr5ejjf3u96rkbifhgrf4o9pln_at_4ax.com...
| Oops - I forgot to mention something important
|
| The problem only appears when I do to_date(sysdate) which I know is
| stupid, but it comes from a procedure I was trying to run when I found
| out it wouldn't run in certain databases.
|

I think your observations make sense when you consider that to_date(sysdate) means to_date(to_char(sysdate)), which means to_date(to_char(sysdate,'dd-MON-yyyyy')) until you set the nls_date_format, and then it means to_date(to_char(sysdate,'{your nls_date_format}')).

-- 

Regards

Jonathan Lewis
http://jonathanlewis.wordpress.com/all-postings

Author: Oracle Core (Apress 2011)
http://www.apress.com/9781430239543
Received on Fri Apr 05 2013 - 22:24:34 CEST

Original text of this message