Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Help building logic for date selection
Message
 
 
To
23/03/2005 12:51:17
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00998528
Message ID:
00998533
Views:
15
>My brain is not working well today so I'm going to ask for some elementry help.
>
>I have attendence in a table with start dates and end dates of when an employee is on leave.
>
>I want to write a query (SQL Server backend) to retrieve all the records that fall between those two specified dates.
>
>Started with logic like: startdate >= ?vp_start and enddate < = ?vp_end but that doesn't return all the results it should.
>
>Simple I know... but it's been a rough day!
>
It should work as long as dates (datetimes) in SQL Server are stored w/o time portion. Otherwise change it to
vp_end = vp_end + 1   && assuming that vp_end is a date type
startdate >= ?vp_start and enddate < ?vp_end
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform