What Day is Today
Posted on 2009-04-08
I was wondering if you could help? Needless to say I was driven crazy for a week before I whittled the problem down to the fact that our databases are set to "AMERICA" when we are in "AUSTRALIA":
select * from sys.props$ where name = 'NLS_TERRITORY'
NAME VALUE$ COMMENT$
NLS_TERRITORY AMERICA Territory
The question is:
Why do different Oracle clients give me a different answer to...?
select sysdate, to_char(sysdate, 'D') day_id from dual
If Today is Thursday, the answer to this SELECT is different with different VB.NET, Oracle clients (11g ODP.NET / 9i OracleClient)...
Oracle 9i design time (running query as "Preview Data" in a strongly-typed dataset)
9/04/2009 1:59 PM 5
Oracle 9i runtime:
9/04/2009 2:00 PM 4 (correct as far as I'm concerned!!!)
Oracle 11g (design / runtime):
9/04/2009 2:01 PM 5
I would like to be able to run either client and always get an answer of "4" for a Thursday.
Any help would be most appreciated.