N
Nithin
I have a Start_date fieild as datatime on my SQL server (eg)
01-22-2003 2:11:41 PM.
I use 2 Calendar control to generate a datagrid of records that were
created between the 2 dates, namely Beginning Date and Ending Date.
The following query works but when EndDate is today's date it displays
records till yesterday and I guess is the problem when I try to use
only 1 calendar control to display records for particular date only.
strSQL = "SELECT *" & _
" FROM Tracker2 " & _
" WHERE Start_date >= '" & BeginDate.SelectedDate & "' AND Start_date
<= '" & EndDate.SelectedDate & "' AND Ticket_type='" &
ddlTicketType.SelectedValue() & "' ORDER By Start_date"
If StartDate=1/1/2004 and EndDate = 1/22/2004 it displays records from
1/1/2004 till 1/21/2004 (not 1/22/2004)
I would like to use only 1 Calendar control and changed the WHERE part
of the query to " WHERE Start_date = '" & BeginDate.SelectedDate & "'
Is it bcos of the datetime format..if so how do I rectify it??
01-22-2003 2:11:41 PM.
I use 2 Calendar control to generate a datagrid of records that were
created between the 2 dates, namely Beginning Date and Ending Date.
The following query works but when EndDate is today's date it displays
records till yesterday and I guess is the problem when I try to use
only 1 calendar control to display records for particular date only.
strSQL = "SELECT *" & _
" FROM Tracker2 " & _
" WHERE Start_date >= '" & BeginDate.SelectedDate & "' AND Start_date
<= '" & EndDate.SelectedDate & "' AND Ticket_type='" &
ddlTicketType.SelectedValue() & "' ORDER By Start_date"
If StartDate=1/1/2004 and EndDate = 1/22/2004 it displays records from
1/1/2004 till 1/21/2004 (not 1/22/2004)
I would like to use only 1 Calendar control and changed the WHERE part
of the query to " WHERE Start_date = '" & BeginDate.SelectedDate & "'
Is it bcos of the datetime format..if so how do I rectify it??