简体   繁体   English

将sybase datetime格式转换为oracle时间戳

[英]converting sybase datetime format to oracle timestamp

I am getting bellow datetime format from sybase DB 我正在从sybase DB获取以下日期时间格式

2015-08-12T11:49:50.196+01:00

and i need to insert this value into oracle database column of type TIMESTAMP(6). 我需要将此值插入到TIMESTAMP(6)类型的oracle数据库列中。

i am not able to specify the correct format to insert the above datetime in to Timestamp column in oracle. 我无法指定正确的格式将上述日期时间插入oracle的“时间戳”列中。

can any one help me in this. 谁能在这方面帮助我。

thanks in advance. 提前致谢。

Are you sure that you don't want to store time zone information (thus type TIMESTAMP(6) WITH TIME ZONE)? 您确定不想存储时区信息(因此键入TIMESTAMP(6)WITH TIME ZONE)吗?

CREATE TABLE timestamp (value TIMESTAMP(6));
INSERT INTO timestamp VALUES (TO_TIMESTAMP_TZ('2015-08-12T11:49:50.196+01:00', 'YYYY-MM-DD"T"HH24:MI:SS.FF3 TZH:TZM'));

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM