Home All Groups Group Topic Archive Search About

Entering data to an sql express db from date time picker

Author
7 Jul 2006 9:11 AM
reidarT
I have changed from an access db to sql express and use an insert statement
to add data from a datetime picker to the datetime field in the db.
Earlier I had to do some manipulation like "#" & Mid(dteDato,1,2)... to get
the
right format.
I am not sure how to do it with sql, I only get 01.01.1900
reidarT

Author
7 Jul 2006 5:18 PM
raibeart
Try "'" & dteDato) & "'"

In SQL Server you use single quotes around anything other than a
number.

reidarT wrote:
Show quoteHide quote
> I have changed from an access db to sql express and use an insert statement
> to add data from a datetime picker to the datetime field in the db.
> Earlier I had to do some manipulation like "#" & Mid(dteDato,1,2)... to get
> the
> right format.
> I am not sure how to do it with sql, I only get 01.01.1900
> reidarT