oracle中date错误,ORA-01830: date format picture ends before converting entire input string
2016-08-30 14:36
1611 查看
select "TO_DATE"('2016/08/11 00:00:00', 'yyyy/mm/dd') from dual
报错ORA-01830: date format picture ends before converting entire input string
错误产生原因:date类型不能包含秒以后的精度。
如日期:2012-06-20 21:01:24
在使用to_date() 函数时有可能出现此错误
解决办法:
to_date('2012-06-20 21:01:24','yyyy-mm-dd') 是错误的
使用instr(详细用法 http://www.cnblogs.com/BetterWF/archive/2012/06/20/2556444.html) 函数配合使用,例如:
to_date( substr('2012-1-1 00:00:00',0,INSTR('2012-1-1 00:00:00', ':', 1, 1)-3),'yyyy-mm-dd') 是正确的
报错ORA-01830: date format picture ends before converting entire input string
错误产生原因:date类型不能包含秒以后的精度。
如日期:2012-06-20 21:01:24
在使用to_date() 函数时有可能出现此错误
解决办法:
to_date('2012-06-20 21:01:24','yyyy-mm-dd') 是错误的
使用instr(详细用法 http://www.cnblogs.com/BetterWF/archive/2012/06/20/2556444.html) 函数配合使用,例如:
to_date( substr('2012-1-1 00:00:00',0,INSTR('2012-1-1 00:00:00', ':', 1, 1)-3),'yyyy-mm-dd') 是正确的
相关文章推荐
- PLSQL语句执行正确,而VB执行错误。ORA-01830 date format picture ends before converting entire input string
- The error: ORA-01830: date format picture ends before converting entire input string..
- ORA-01830: date format picture ends before converting entire input string
- The Error ORA-01830: date format picture ends before converting entire input string
- date format picture ends before converting entire input string(日期格式图片在转换整个输入字符串之前结束)
- java.sql.SQLException: ORA-01830: date format picture ends before converting ent
- Oracle - ORA-01840: input value not long enough for date format
- Oracle 异常 ORA-01861: literal does not match format string(字符串格式不匹配)
- Input string was not in a correct format. 错误解析
- Oracle 异常 ORA-01861: literal does not match format string(字符串格式不匹配)
- 执行Hive时出现org.apache.hadoop.util.RunJar.main(RunJar.java:136) Caused by: java.lang.NumberFormatException: For input string: "1s"错误的解决办法(图文详解)
- hibernate 中createSQLQuery 聚合分组 java.lang.NumberFormatException: For input string:错误的一个解决办法
- Oracle 异常 ORA-01861: literal does not match format string(字符串格式不匹配)
- Oracle异常ORA-01861:literal does not match format string(字符串格式不匹配)
- Oracle:ORA-01810:格式代码出现两次 日期格式、时间格式、to_date错误
- Oracle 异常 ORA-01861: literal does not match format string(字符串格式不匹配)
- Oracle 异常 ORA-01861: literal does not match format string(字符串格式不匹配)
- 解决:Oracle 异常 ORA-01861: literal does not match format string(字符串格式不匹配)
- 解决sqoop 导入oracle表时 --split-by参数为日期类型时的报错:ORA-01861: literal does not match format string
- ORACLE 错误 ora-01830 解决方法