Oracle 批量复制日期格式问题

Oracle bulkcopy date format issue

这正是我的问题,但找不到合适的答案,所以再次询问... http://www.codeproject.com/Questions/775780/Year-and-century-being-swapped-when-inserting-a-da

我正在将数据从 csv 导入到 oracle db。 Csv 到数据表并使用 oracle bulkcopy 到 db。数据表中的日期格式为 ddMONyy (05FEB15)。但在数据库中它被保存为 dd-MON-yy (05-FEB-20)。 Select 语句给出 02/05/1520。 年份的千禧年部分被交换。为什么会这样?

谢谢。

我找不到1520掉期的原因。正如上面评论中提到的,我将数据库中的日期列更改为 varchar2,并且能够加载:

 row("EXPORT_DATE") = fieldData(19)
                '****************************Check for the date formats to avoid error when exporting****************************
                Dim formats = New String() {"dd-MMM-yyyy", "d-MMM-yyyy", "dd-MMM-yy", "d-MMM-yy", "ddMMMyyyy", "dd/MM/yyyy", "d/MM/yyyy", "yyyy-MM-dd", "M/d/yyyy"}
                Dim outDate As Date
                If (Date.TryParseExact(fieldData(19), formats, System.Globalization.CultureInfo.InvariantCulture, System.Globalization.DateTimeStyles.None, outDate)) Then
                    row("EXPORT_DATE") = outDate.ToString("ddMMMyyyy")
                    'Else 'Not working
                    '    row("EXPORT_DATE") = outDate.ToString("ddMMMyyyy")
                End If
                '****************************Check for the date formats to avoid error when exporting****************************