2 Replies Latest reply on Feb 8, 2013 10:00 PM by 581029

    Date is returned with wrong century


      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?