Link to home
Start Free TrialLog in
Avatar of triphen
triphen

asked on

vb.net SQL Datetime

Hello Experts,

I am trying to update a record in a SyBase SQL database. Below is my code

SQLExec.POS_SQL_Exec("update sysinfo set holdstockdepl = '" & Now().ToString & "'")

Open in new window


It produces the following error.

---------------------------
Error: Exception
---------------------------
ERROR [07006] [Sybase][ODBC Driver][SQL Anywhere]Cannot convert '9/24/2015 3:44:58 PM' to a timestamp
---------------------------
OK  
---------------------------

Any ideas?
ASKER CERTIFIED SOLUTION
Avatar of Ryan Chong
Ryan Chong
Flag of Singapore image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of triphen
triphen

ASKER

Thank you!