oracle中的日期格式错误 [英] Date Format error in oracle
本文介绍了oracle中的日期格式错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
先生/女士
我在asp.net C#代码后面使用了gridview,在gridview行edting事件中我写了更新查询,但在运行时显示此错误"ORA-01830:日期格式图片在转换整个输入字符串之前结束"
解决方案
在查询中使用To_Date函数,我相信oracle db中的日期格式和您从aspx页传递的日期格式是不同的.
TO_DATE (DateFeild, ''DD-MON-YYYY HH24:MI:SS'')
要在oracle中获取当前日期格式,请使用此查询.
从v中选择值
nls_parameters WHERE参数=''NLS_DATE_FORMAT'';
sir/madam
I used gridview in asp.net C# code behind,in gridview row edting event i wrote update query but in run time show like this error"ORA-01830: date format picture ends before converting entire input string"解决方案use To_Date function in your query, I believe the date format in your oracle db and the date format that you are passing from the aspx page is different.
TO_DATE (DateFeild, ''DD-MON-YYYY HH24:MI:SS'')
To get the current date format in oracle use this query.
SELECT value FROM v
nls_parameters WHERE parameter =''NLS_DATE_FORMAT'';
这篇关于oracle中的日期格式错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文