Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Date range isn't inclusive
Message
 
To
23/02/1999 15:35:23
Patty Prendergast
Calif. Dept of Toxic Substances Control
Sacramento, California, United States
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00190635
Message ID:
00190644
Views:
13
Your problem is that when you compare a date to a date/time the date field is assumed to be at 12:00:00 AM. This makes it less than your date/time calldate. You can easily convert the vp_end variable to the latest possible date/time for the same date by saying: vp_end=DTOT(DATE()+1)-1. This basically says to make the date equal to the following date minus 1 second. If you do this before you USE or REQUERY() your view you won't have a problem.

>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.
Previous
Reply
Map
View

Click here to load this message in the networking platform