|
-
Oct 5th, 2010, 09:36 AM
#1
Thread Starter
PowerPoster
Exteacting records on date criteria
with vb.net + access03
the table is like this
employeename
leavetype
fromdate
todate
i want to extract the records basing on date criteria say for eg:- fromdate is between 01/02/10 and 10/02/10
query works fine but
what if a employee is on leave from 31/01/10 to 11/02/10 query won't return this record at all
actually in the specified period the employee having 10 days of leave from 01/02/10 to 10/02/10
in such kind of situations how to extract the leave period of an employee
any guidance please
-
Oct 5th, 2010, 10:00 AM
#2
Re: Exteacting records on date criteria
Both the FromDate and ToDate would need to be used in the criteria.
To find employees on leave within a given date range
Where FromDate <= EndofDateRange And ToDate >= StartofDateRange
-
Oct 5th, 2010, 10:39 AM
#3
Re: Exteacting records on date criteria
If you are not using parameters the dates need to be in either US Standard (mm/dd/yyyy) or ANSI standard (yyyymmdd)
Sometimes the Programmer
Sometimes the DBA
Mazz1
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|