OCCI, y2k, RRRR year format [message #93957] |
Mon, 26 May 2003 23:31 |
pratish
Messages: 1 Registered: May 2003
|
Junior Member |
|
|
Does anyone know how to go about dealing with y2k dates? If I set a Timestamp object with date "05/25/98" using "mm/dd/yyyy" date format, OCCI returns the year as 0098. OCCI docs tell us to use "mm/dd/rrrr" nls date format that also gives us the century value for the year (1998). But it just does not work! Consider this...
Environment *env = Environment::createEnvironment(Environment::OBJECT);
Timestamp ts;
ts.fromText("05/25/98", "mm/dd/yyyy", "mm/dd/rrrr", env);
ts.getDate(year, mon, day);
cout << year << endl; // displays 98
Inspite ot setting nls date format, the Timestamp gives me year value as 98 and not 1998.
Can anyone help me out??
Thanks.
|
|
|