>>I create a view for a report by using a SELECT statement that has a WHERE clause that filters on the date range that the user enters. The statement is WHERE calldate >= ?vp_start AND calldate <= ?vp_end. It works fine unless the call date is the same date as the vp_end date, that call doesn't get included. The user has to make the ending date one day past the date they want included. I tried using BETWEEN(), but had the same results. Calldate is a date/time field. I'm using VFP 5.0.
>
>Patty,m
>
>Change your where clause to;
>
>WHERE TTOD(CallDate) >= ?vp_start AND TTOD(CallDate) <= ?vp_end
>
>the problem is that you are referencing a date time value and 8am comes after 1am.
This will work but if you have an index on CallDate and not TTOD(CallDate) you'll lose Rushmore optimization.