I created a windows form application that will insert data into a SQL Server 2005 database. When I do this, I get the following error.
Conversion failed when converting datetime from character string.
Here's my VB.Code:
Dim strDate as STring = Format(Cdate(DateTime.Now), "yyyy-MM-dd").ToString
The date in the database should look like the following: 2010-08-18 00:00:00.000
Trying to get it to same format for the insert. Any ideas?