Date calculation help needed

  • Thread starter Thread starter Lee
  • Start date Start date
L

Lee

I need to calculate an employee's length of service based
on date of hire. This is what I have created so far:

DateDiff("yyyy",[date of hire],#12/31/2003#)

My problem is that employees who were hired less than a
year ago are showing up as 0. I'd like the query to show
months when it is less than a year. It is OK if employees
with more than a year's service show up as something like
1.8 years.

Any help would be appreciated,
Lee
 
Never mind, I figured it out.

DateDiff("yyyy",[date of hire],#12/31/2003#) & "." &
DateDiff("m",[date of hire],#12/31/2003#)

(I needed length of service as of 12/31/2003, BTW.)
 
Back
Top