G
Guest
I have written a program that saves a date and time field as:
4/22/2005 6:30:00 PM
I want the user to click a date in a calendar control, and then populate a
data grid with the data for only the date the user clicked. I don't care
about the time, I want to use SQL to search for the date in the beginning of
the field.
My SQL statement is as follows:
sql = "SELECT CalendarDateTime, Appointment From Calendar " & _
"WHERE CalendarDateTime LIKE '#" & Me.labelSelectedDate.Text & "#%' ORDER
BY CalendarDateTime"
I am doing something wrong because my DataGrid does not show any data. If i
change the statement to a generic SELECT * FROM Calendar, the data is
displayed. I know I have an error in my SQL statement.
Any Ideas?
4/22/2005 6:30:00 PM
I want the user to click a date in a calendar control, and then populate a
data grid with the data for only the date the user clicked. I don't care
about the time, I want to use SQL to search for the date in the beginning of
the field.
My SQL statement is as follows:
sql = "SELECT CalendarDateTime, Appointment From Calendar " & _
"WHERE CalendarDateTime LIKE '#" & Me.labelSelectedDate.Text & "#%' ORDER
BY CalendarDateTime"
I am doing something wrong because my DataGrid does not show any data. If i
change the statement to a generic SELECT * FROM Calendar, the data is
displayed. I know I have an error in my SQL statement.
Any Ideas?