0
votes
update users Set USER_ACCOUNT_DIS = to_timestamp('6/18/2013 1:41:05 PM','YYYY-MM-DD HH24:MI:SS') Where user_id='mytestuser'

Microsoft OLE DB Provider for ODBC Drivers error '80004005'

[Oracle][ODBC][Ora]ORA-01843: not a valid month

i am getting the date as the "Now()" from classic asp see below:

sqlText4="update users " 
                sqlText4=sqlText4 & "Set  USER_ACCOUNT_DIS =  to_timestamp('" & Now()&"','YYYY-MM-DD HH24:MI:SS')  "
                sqlText4=sqlText4 & " Where user_id='"&p_user_id&"'"
                Response.Write sqlText4
                objconnencore.Execute(sqlText4)
1

1 Answers

0
votes

Your format template parameter in the to_timestamp() function is wrong.

Try:

to_timestamp('" & Now()&"','MM/DD/YYYY HH:MI:SS PM')