Rephrased, given I use date like so:
date'2010-04-10'
, could the outcome be anything but April 10th 2010 (e.g. October 4th 2010)?
UPDATE I hear what you, and the docs, say. But...
When a batch job runs, with hard-coded date'yyyy-mm-dd':s, it fails for some (non-deterministic) calculations. Running the failing SQL statements in PL/SQL Developer never yields the same, incorrect, value.
First, I ran the same calculations (hundreds of thousands) with the date'' date literals replaced with the to_date('', '') function, and everything worked just fine.
Then, I used NHibernate and its LINQ provider, and replaced the hand-crafted SQL altogether. ... and everything worked just fine... NHibernate produces a '' date literal, with the time part included, BTW.
UPDATE A colleague of mine wrote some code, that can reproduce the error in our environment. He posted his findings (including the code) at Oracle Forums: https://forums.oracle.com/forums/thread.jspa?threadID=2304569&tstart=0
UPDATE Changed the title according to zerkms' answer.
It is not function, but date literal. And, Yes, it always matches YYYY-MM-DD
regardless any oracle settings.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With