I have made a simple program in VB.Net.
In this program I made two DataTimePicker with the names of
1. DtpFrom
2. DtpTo
I want to get the dates from tblStudents between the dates given in the dtpFrom and dtpTo.
The Date Format for these two DateTimePicker and in tblStudents is "M/d/yyyy".
When I run this query.
it gives me some times correct results but some times it missed some of the dates.Code:"Select AdDate from tblStudents where AdDate >= '" & Format(dtpFrom.value,"M/d/yyyy") & "' and AdDate <= '" & dtpTo & "'"
I want to get the precised dates, without missing any date. So is there any Mechanism to solve this Problem.




Reply With Quote