The error: ORA-01830: date format picture ends before converting entire input string..
来源:互联网 发布:js 表格控件 编辑:程序博客网 时间:2024/06/18 05:18
Got error when they tried to insert data.
Insert into CAM_LOGS (COMMENTS,CREATED_BY,CREATED_TS) values ('INFO:[mess_wellcome_user] start sending email to : ALEXANDRA.TORRES@ORACLE.COM for user 44501','send_mail_users_AI',to_timestamp('08-MAR-11 02.27.35.000000000 PM EUROPE/LONDON','DD-MON-RR HH.MI.SSXFF AM'))
*
ERROR at line 1:
ORA-01830: date format picture ends before converting entire input string
Insert into CAM_LOGS (COMMENTS,CREATED_BY,CREATED_TS) values ('INFO:[mess_wellcome_user] start sending email to : MARCOS.FERREIRA@ORACLE.COM for user 44502','send_mail_users_AI',to_timestamp('08-MAR-11 02.27.35.000000000 PM EUROPE/LONDON','DD-MON-RR HH.MI.SSXFF AM'))
*
ERROR at line 1:
ORA-01830: date format picture ends before converting entire input string..
I found the data format is not correct on this:
Insert into CAM_LOGS (COMMENTS,CREATED_BY,CREATED_TS) values ('INFO:[mess_wellcome_user] start sending email to : ALEXANDRA.TORRES@ORACLE.COM for user 44501','send_mail_users_AI',to_timestamp('08-MAR-11 02.27.35.000000000 PM EUROPE/LONDON','DD-MON-RR HH.MI.SSXFF AM'))
*
ERROR at line 1:
ORA-01830: date format picture ends before converting entire input string
Insert into CAM_LOGS (COMMENTS,CREATED_BY,CREATED_TS) values ('INFO:[mess_wellcome_user] start sending email to : MARCOS.FERREIRA@ORACLE.COM for user 44502','send_mail_users_AI',to_timestamp('08-MAR-11 02.27.35.000000000 PM EUROPE/LONDON','DD-MON-RR HH.MI.SSXFF AM'))
*
ERROR at line 1:
ORA-01830: date format picture ends before converting entire input string..
Let us see the details about the fuction of TO_TIMESTAMP.
TO_TIMESTAMP:
Converts a character string of CHAR
, VARCHAR2
, NCHAR
, or NVARCHAR2
datatype to a value of TIMESTAMP
datatype
TO_TIMESTAMP_TZ:
Converts a character string of CHAR
, VARCHAR2
, NCHAR
, or NVARCHAR2
datatype to a value of the TIMESTAMP WITH TIME ZONE
datatype
Then Ithink we should use TO_TIMESTAMP_TZ becasue the data with the TIME ZONE.
SQL> select SYSTIMESTAMP from dual;
SYSTIMESTAMP
---------------------------------------------------------------------------
11-MAR-11 12:22:03.425521 AM -07:00
SQL> select to_timestamp_tz('08-MAR-11 02.27.35.000000000 PM EUROPE/LONDON','DD-MON-RR HH.MI.SSXFF AM tzr') from dual;
TO_TIMESTAMP_TZ('08-MAR-1102.27.35.000000000PMEUROPE/LONDON','DD-MON-RRHH.M
---------------------------------------------------------------------------
08-MAR-11 02:27:35.000000000 PM EUROPE/LONDON
It works.
- The error: ORA-01830: date format picture ends before converting entire input string..
- oracle中date错误,ORA-01830: date format picture ends before converting entire input string
- Oracle异常date format picture ends before converting entire input string ora-01830oracle
- date format picture ends before converting entire input string(日期格式图片在转换整个输入字符串之前结束)
- java.sql.SQLException: ORA-01830: date format picture ends before converting ent
- 'Conversion failed when converting date and/or time from character string.DB-Lib error message 241,
- Oracle - ORA-01840: input value not long enough for date format
- Date、String.format常见用法
- the format control string
- string date(string format,int[timestamp]); 的format 的使用说明!
- string date(string format,int[timestamp]); 的format 的使用说明!
- Java format date to String or String to date
- Compare two different format date string
- Date和String.format常见用法
- the format string of java
- The format of string resources
- Examples of The RR Date Format
- The Different Format of Date in English
- Cocoa Touch的三种类的交流方式-delegate、target和notification
- 随记~小结
- ASP.NET读写Excel文件(转自博客园某博主)
- Linux内核定时器
- xml
- The error: ORA-01830: date format picture ends before converting entire input string..
- Visual Studio 各版本区别: 从1998年的 6.0 到现在的 2010 Ultimate
- 提高SQL执行效率的几点建议
- 做好残疾人工作 维护社会和谐稳定
- 创建字符设备的三种方法
- Chrome与ibus冲突解决方法
- Zend Studio-8.0.0中文汉化教程及入门教程
- 对LDD3前七章的一个小节
- Windows CE控制面板定制--系统属性