在oracle日期时间无效的月份 [英] not valid month in oracle date time

查看:816
本文介绍了在oracle日期时间无效的月份的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Insert into PEPSIRENDEEMHISTORY(PIN,STATUS,CURRENTDATE,MSISDN,USERNAME,SIM)
VALUES ('4501664170',1,'5/12/2013 8:05:26 PM','2348121846632','ranjith-PC\ranjith',1)





插入显示无效月份时的日期时间问题



Problem with date time while inserting showing not valid month

推荐答案

请检查: http://www.techonthenet.com/oracle/questions/insert_date.php [< a href =http://www.techonthenet.com/oracle/questions/insert_date.phptarget =_ blank title =New Window> ^ ]


在你的java代码中获取它。并使用​​SimpleDateFormat类指定ur日期格式的格式然后将其转换为util日期然后将格式转换为时间戳格式,然后将其插入带有日期和时间的数据库
Get That in in your java code.and use SimpleDateFormat class specify the format of ur date format then convert that one into util date format then convert that one into timestamp format then it will inserted into database with date and time


使用这样的语法。



to_date('2011/04/22 08:30:00','yyyy / mm / dd hh24:mi:ss')



对你来说就像

use syntax like this.

to_date('2011/04/22 08:30:00', 'yyyy/mm/dd hh24:mi:ss')

for you its like
Insert into PEPSIRENDEEMHISTORY(PIN,STATUS,CURRENTDATE,MSISDN,USERNAME,SIM)
VALUES ('4501664170',1,to_date('2011/04/22 08:30:00', 'yyyy/mm/dd hh24:mi:ss'),'2348121846632','ranjith-PC\ranjith',1)





-SG



-SG


这篇关于在oracle日期时间无效的月份的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆