Hello ;
I'm trying to insert date value to Sql server DB by using vb.net .
here is the sql command
"INSERT INTO [Orders]([ProductID],[CustomerID],[EmployeeID],[OrderDate],[Quantitiy],BillNuber) VALUES (" & ProductID & "," & CustomerID & "," & EmployeeID & "," & System.DateTime.Now.ToString((" yyyy-MM-dd")) & "," & Quantity & "," & billnumber & ")"
I also used Now.tostring("yyyy/MM/DD") , Today.tostring("yyyy/MM/DD")
the problem when i Use now() error message pops "error near '2'"
and even if there is no error and when i use today() or system.datetime , when i check the database the date look like "1900-01-01 00:00:00.000"
can you help me ?
What I have tried:
now()
today()
Now.tostring("yyyy/MM/DD")
Today.tostring("yyyy/MM/DD")