I have a webpage for selecting values from a MySQL database, using 1 dropdownlist and 2 calendars for date.
My problem is that the calendar returns dates in the form '08/06/2011' and my database date entries are in datetime format '08/06/2011 14:00:21' hence decided to add the time on the date selection in my query as such
SqlDataSource2.SelectCommand = "SELECT time as TIME,sum(value) as Value FROM splog WHERE register = @register1 AND (time BETWEEN @time2 00:00:00 AND @time1 00:00:00)";
But I get errors regarding this at runtime.
How do I add the time field of the datetime in my command?
Thanks in advance.