Hi,
I have a date time picker which displays date in the long format -
Friday, April 13, 2007.
I have a table where my date field is formated as short date - 13/4/2007.
My problem is that i get an error when trying to use value property of the datetime picker when passing it in the sql statement.
it is as follows
I get a datatype mismatch error.Code:"Select * from tablename where datefieldname='" + dtpDatePick.Value + "'";
I need to keep the date view in the long format itself. Therefore how can I format the date when I pass it in the sql statement.![]()




Reply With Quote