且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

oracle中的日期格式错误

更新时间:2023-11-29 13:28:52

在查询中使用To_Date函数,我相信oracle db中的日期格式和您从aspx页传递的日期格式是不同的.
TO_DATE (DateFeild, ''DD-MON-YYYY HH24:MI:SS'')



要在oracle中获取当前日期格式,请使用此查询.
从v中选择值​​lockquote>

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'';