October 18th, 1999, 11:44 AM
Hi
I am using VB6.0 and MS SQL 7.0. I got a table with a date field(type datetime). When I tried to enter date using sql stmt from VB it gave error. Same was the case when I tried from Query Analyzer. But when I typed the minute, seconds etc with the field it accepted. It then looks like this.
insert tmpgrn (GRNNo,CID,CAddress,GRNDate,Remarks,BOENo,BOEDate) values(11,1,'qwer','18-10-1999 00:00:00.000',1,23,'18-10-1999 00:00:00.000')
This date is picked from the date picker control and so I dont want to store time info. What should I do inorder for SQL Server to accept 18/10/199 as the data in a datetime field or how will the sql statement look like
Thanks in advance
James
I am using VB6.0 and MS SQL 7.0. I got a table with a date field(type datetime). When I tried to enter date using sql stmt from VB it gave error. Same was the case when I tried from Query Analyzer. But when I typed the minute, seconds etc with the field it accepted. It then looks like this.
insert tmpgrn (GRNNo,CID,CAddress,GRNDate,Remarks,BOENo,BOEDate) values(11,1,'qwer','18-10-1999 00:00:00.000',1,23,'18-10-1999 00:00:00.000')
This date is picked from the date picker control and so I dont want to store time info. What should I do inorder for SQL Server to accept 18/10/199 as the data in a datetime field or how will the sql statement look like
Thanks in advance
James