The text is correctly, p.e. 25.11.2010 for the first date and 07.12.2010 for the last date.
Here is an example of the result:
11/25/2010 12:25:26 AM
I get only dates with the 12th day of any month from january to juli of this year, the dates of 25. to 30. november and no dates from december.
The given date format is different between the november and 12th day dates, like in the example.
In Windows 7 and O-Client 11x it works correctly, but I have many PC with XP and the older Client. How can I change my code?
In sql-developer on the same XP pc it works also correctly, but it may be, that I have in this case an odbc-connection.
I tried this:
' objDatabase.ExecuteSQL ("ALTER SESSION SET NLS_LANGUAGE = 'GERMAN'")
' objDatabase.ExecuteSQL ("ALTER SESSION SET NLS_TERRITORY = 'GERMANY'")
' objDatabase.ExecuteSQL ("ALTER SESSION SET NLS_NUMERIC_CHARACTERS = '.,'")
' objDatabase.ExecuteSQL ("ALTER SESSION SET NLS_DATE_FORMAT = 'DD.MM.YYYY HH24:MI:SS'")
but it doesn't help... openSession has no Execute command, and objDatabase has only an ExecuteSQL method
Here is the complete code to open the database connection:
Public objSession As OraSession
Public objDatabase As OraDatabase
Public objDynaset As OraDynaset
Public objFields As OraFields
' Use OO4O - OracleInProcServer
Set objSession = CreateObject("OracleInProcServer.XOraSession")
Set objDatabase = objSession.OpenDatabase("myDBname", "/", 0)
objDatabase.ExecuteSQL ("ALTER SESSION SET NLS_DATE_FORMAT = 'DD.MM.YYYY HH24:MI:SS'")