关于时间比较,ORA-01861: literal does not match format string
来源:互联网 发布:淘宝卖的印度威格拉 编辑:程序博客网 时间:2024/05/01 00:25
项目中数据库的数据是date类型, 页面获取的的是String ,涉及到去数据查询,直接将获取的字符串去比较会报出ORA-01861: literal does not match format string
解决办法:
1). ORA-01861: 文字与格式字符串不匹配
2). 必须指定日期格式
to_date('2010-05-11 14:20:24' , 'yyyy-mm-dd hh24:mi:ss')
3). 比较时间也可以将数据的时间字段to_char('时间','yyyy-mm-dd hh24:mi:ss').变成字符串,再去按字符串比较.
当然你的字符串'2010-5-1'也要to_char(to_date('2010-5-1','yyyy-mm-dd hh24:mi:ss'),'yyyy-mm-dd hh24:mi:ss').
0 0
- 关于时间比较,ORA-01861: literal does not match format string
- 关于ORA-01861: literal does not match format string
- ORA-01861: literal does not match FORMat string 错误原因
- Oracle异常ORA-01861: literal does not match format string。
- ORA-01861: literal does not match format string 错误!
- 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(字符串格式不匹配)
- 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(字符串格式不匹配)
- 解决Oracle异常ORA-01861:literal does not match format string(字符串格式不匹配)
- Oracle异常ORA-01861:literal does not match format string(字符串格式不匹配)
- literal does not match format string 解决办法
- literal does not match format string
- Oracle 异常 ORA-01861: literal does not match form
- format not a string literal and no format arguments
- format not a string literal and no format arguments
- 2015.10.09开博记录一下
- 013-通过trident实现单词计数功能
- WebService -- JAX-WS : 入门
- 边沿检测与提取,轮廓跟踪
- 如何实现网站高并发访问
- 关于时间比较,ORA-01861: literal does not match format string
- poj3685
- ime stamp counter
- jsp好的乱码解决办法收集
- lvs & keepalived的tcp 长连接的问题解决办法
- vsftpd配置文件详解
- HDU 1824 Let's go home 2-sat基础
- DIV中class和id的区别
- warning:deprecated conversion from string constant to 'char *' 解决方案