Hi
I was wondering if someone could help me. I have a query that is failing due to the above error message. My web form is passing the following section to SQL:
string datetime = "13/12/2014 13:12:00";
bookingcommon.BookingTime = DateTime.Parse(datetime);
bookingcommon.BookingTime is a DateTime object.
However, when examining the query in profiler it is getting passed in as follows:
@BookingTime='Dec 13 2014 1:12:00:000PM',
@BookingTime is set as DateTime type in SQL.
Therefore when my SP is running I am getting the error message: Error converting data type varchar to datetime
I'm not sure whether my code or SQL is causing this. Can someone let me know what is happening?
Thanks
Rob
Go to the complete details ...