Help with Query

  • Thread starter r705271 via AccessMonster.com
  • Start date
R

r705271 via AccessMonster.com

I need some help designing a query that calculates a specific date from the
hire date of an employee. For example: an employee is hired on 05/13/08 and
3 months from the hire date they are required to take some sort of refreasher
class. I want to create a query that I can run to count those days. This
would only be a Monday-Friday work week.

Please help.
 
K

KARL DEWEY

a query that calculates a specific date from the hire date of an employee.
DateAdd("m", 3, [hire date])
Why do you need to count?
Why worry about workweek when you said 3 months from hire date?
 
J

John Spencer

One way might be the following UNTESTED expression. It will set Monday
if 3 month date falls on Saturday and Tuesday if 3-month date falls on
Sunday.

DateAdd("d",IIF(WeekDay(DateAdd("m",3,[HireDate])) in
(1,7),2,0),DateAdd("m",3,[HireDate]))

'====================================================
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
'====================================================
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top