Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> OO4O and Dates
I'm using OO4O in my Visual C applications to access both Oracle 7 and 8
databases. I've written wrappers around the OO4O classes so that I can
easily convert my app to use either Microsoft Access or Oracle databases.
Everything works great except that when I GetFieldValue() for date fields,
it's not returning in the correct format. If I use TO_CHAR in my SQL, I can
get the desired results, but I don't want to have to do that for every date.
Plus that makes the SQL "non-Access."
Shouldn't I be able to issue an "ALTER SESSION SET NLS_DATE_FORMAT = 'MM/DD/YYYY'" when I first connect to my database so that dates get returned in the format I need? I do this, and I don't get an error, but the returned dates don't recognize my new format. When I first wrote my classes, I thought this method worked, but either I'm mistaken or something has changed.
Some examples of the dates I get back are:
1/27/99
1/27/99 12:03:23 PM
I want 01/27/1999.
Thanks in advance for any help.
Rich Chopyak
Alpine Technology Group
rich_at_alpinetg.com
Received on Wed Jan 27 1999 - 15:26:15 CST
![]() |
![]() |