在SQL Developer中导入数据时读取时间戳 [英] Reading timestamps when importing data in SQL Developer
问题描述
我正尝试使用SQL Developer中的数据导入向导将文本文件读入Oracle数据库。
我被卡在步骤5上,因为在导入之前我无法获取验证参数,导致我的 timestamp
字段失败。回到第4步,我尝试将我的 timestamp
字段的数据类型更改为时间戳
,带时区的时间戳
和带本地时区的时间戳
。无奈之下,我甚至试过 Date
。没有任何工作。然后,我注意到,当你选择任何时间戳...
或数据类型字段的 Date
类型。所以,我试着指定数据的格式,例如: 01/03/2006 06:25:00 AM -0500
。
不知道格式的正确代码是什么,在线,离线或在我的脑海里找不到任何文档,我尝试了以下所有格式都无济于事: MM / DD / YYYY HH:mm:SS AM +0000
; MM / DD / YYYY HH:mi:SS AM +0000
; MM / DD / YYYY HH12:mm:SS AM +0000
; mm / dd / yyyy hh:mm:ss AM +0000
。
在进一步的绝望中,我已经尝试了各种编码的时间戳的每个子元素的许多组合: MM code>和
对于 mm
为月, DD
和 dd $ c $
和 yyyy
年份, HH
和 hh
和 HH12
小时, mm
和<第二,code $ c> mi AM / PM
和时区字段的疯狂的东西。没有任何工作。
所以,stackoverflow老主顾,我要求你的帮助。我试图寻找解决这个问题的办法,我已经尝试了很多不同的解决方案。我已经尽力了,但是我的最好的一点在这个问题上还不够好。帮我欧比旺;你是我唯一的希望。
您可能需要日期/时间格式:
MM / DD / YYYY HH12:MI:SS AM TZHTZM
这是日期格式文档。
您需要使用时区填充数据类型。
I am trying to read a text file into an Oracle database using the Data Import Wizard in SQL Developer.
I am stuck on step 5 because I cannot get the Verify parameters before import to succeed on my timestamp
fields.
Going back to step 4, I have tried changing the Data type of my timestamp
fields to Timestamp
, Timestamp with time zone
, and Timestamp with local time zone
. In desperation, I even tried Date
. Nothing worked.
I then noticed the Format field that shows up when you select any of the Timestamp...
or Date
types for the "Data Type" field. So, I tried specifying the format for my data, an example of which follows: 01/03/2008 06:25:00 AM -0500
.
Not sure what the proper codes are for the format and finding no documentation online, offline, or in my head, I tried all of the following formats to no avail: MM/DD/YYYY HH:mm:SS AM +0000
; MM/DD/YYYY HH:mi:SS AM +0000
; MM/DD/YYYY HH12:mm:SS AM +0000
; mm/dd/yyyy hh:mm:ss AM +0000
.
In further desperation, I have tried many, many combinations of the various encodings for each of the sub-elements of the timestamp: MM
and mm
for month, DD
and dd
for day, YYYY
and yyyy
for year, HH
and hh
and HH12
for hour, mm
and mi
for minute, SS
and ss
for second, and lots of crazy stuff for the AM/PM
and time zone fields. Nothing has worked.
So, stackoverflow patrons, I ask for your help. I have tried searching for a solution to this problem and I have tried lots of different solutions on my own. I have done my best, but my best hasn't been good enough on this problem. Help me Obi Wan; you're my only hope.
You probably want the date/time format:
MM/DD/YYYY HH12:MI:SS AM TZHTZM
And this is the date format documentation.
And you'll need to selet a data type with timezone.
这篇关于在SQL Developer中导入数据时读取时间戳的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!