Skip to Main Content

ODP.NET

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Date is returned with wrong century

581029Feb 8 2013 — edited Feb 8 2013
Hi,

I'm building an SSIS package to migrate data from an Oracle 11g DB to SQL Server. I'm running into a weird issue when it comes to dates, funny enough...

I've got a date column which contains '67-06-08 00:00:00.0' and is returned as '08-06-67' using SQL Plus. A to_char(datecol, 'DD/MM/YYYY') returns '08-06-1967', as it should. When I execute the exact same query in Visual Studio, I get '08/06/0067' and will fail to insert into a SQL Server database. My first thought was to update the value in Oracle with the complete century, to no avail. Next idea was it might be the drivers so I tried the same over an ODBC connection, with the same result.

I have other dates in that column that until that record, processed fine. When comparing the output of a succeeded record and the bad one in Oracle Enterprise Manager I get this:
67-06-08 00:00:00.0
1981-05-02 00:00:00.0

What could be the problem? Is it just some sort of setting on the DB?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 8 2013
Added on Feb 8 2013
2 comments
564 views