By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,903 Members | 2,075 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,903 IT Pros & Developers. It's quick & easy.

Date calculation - eligibility and elapsed months

P: 8
Let me preface this with the fact that I am a beginner to Access. I have inherited a database of employees, created by someone with far more experience than me, who is no longer with the company.

I have starting dates for employees. They become eligible for leave on the first of the month following 3 months of employment. I have to calculate what this date is. They are then eligible for 4 hours leave per month. I have to track how much they are eligible for and how much they use.

I really have no idea where to begin and have been searching for answers.

Thanks for any guidance you can provide to get me going in the right direction.
Oct 28 '06 #1
Share this Question
Share on Google+
1 Reply


MMcCarthy
Expert Mod 10K+
P: 14,534

I have starting dates for employees. They become eligible for leave on the first of the month following 3 months of employment. I have to calculate what this date is. They are then eligible for 4 hours leave per month. I have to track how much they are eligible for and how much they use.
I am looking at 3 months as 91 days because its easier to calculate.
I don't know how you record hours of leave taken so I've included a field I made up called HoursLeave.

SELECT EmployeeID, EmployeeName, IIf(DateDiff('d',[StartDate])>=91,'Yes','No') As Eligible, (Month(Now()) - Month([StartDate]))*4 As HoursAssigned, sum([HoursLeave]) As HoursTaken
FROM Employees;
Oct 28 '06 #2

Post your reply

Sign in to post your reply or Sign up for a free account.