Inserting timestamp in Oracle from asp ( not a valid month)
1 | 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
我从经典的ASP获取日期为" Now()",如下所示:
1 2 3 4 5 | 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 | to_timestamp('" & Now()&"','MM/DD/YYYY HH:MI:SS PM') |