473,406 Members | 2,273 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Date calculation - eligibility and elapsed months

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
1 1960
MMcCarthy
14,534 Expert Mod 8TB

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

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

Similar topics

2
by: androtech | last post by:
Hello, I'm looking for a function that returns a date range for a specified week number of the year. I'm not able to find functions like this anywhere. Any pointers/help would be much...
4
by: Richard Hollenbeck | last post by:
I'm trying to write some code that will convert any of the most popular standard date formats twice in to something like "dd Mmm yyyy" (i.e. 08 Jan 1908) and compare the first with the second and...
3
by: rhaley | last post by:
ugh. Okay, I need to figure out the number of milliseconds between DateTime.Now and the end of the day so that I can make changes based on the date roll-over. I need to implement a Timer so that I...
0
by: UBI | last post by:
Vorrei suggerire una funzione completa per la differenza fra due date. (questo č codice freeware, niente di illegale) La funzione seguente permette il calcolo di una differenza precisa tra due...
1
by: untiroalaire | last post by:
Hi, here's what I'd like to do: get the time difference (Elapsed) between the "received date" field for all emails (running total) I've dumped into access from outlook and summarize at the...
2
by: Niyazi | last post by:
Hi everyone, I have a sql table that has 5 column as: cl1Month - cl1_3Month - cl3_6Month - cl6_12Month - clMoreThan12Month Now I have to date and I have to find the differences and check as...
6
by: rohayre | last post by:
Im a long time java developer and actually have never done anything with java scripting. I'd like to write a short simple script for calculating a date in the future based on today's date and a...
44
by: user | last post by:
Hi, Let's say I have 2 dates in the b/m format: Date 1 and date 2 How do I check whether Date2 is later than Date 1? Date1. 21-Nov-2006 09:00:00 PM
16
by: W. eWatson | last post by:
Are there some date and time comparison functions that would compare, say, Is 10/05/05 later than 09/22/02? (or 02/09/22 format, yy/mm/dd) Is 02/11/07 the same as 02/11/07? Is 14:05:18 after...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.