length of service formula

  • Thread starter Thread starter D
  • Start date Start date
D

D

I use the following formula with great success, except it
shows employees as having worked for 0 years 12 months
etc - any ideas how to amend this formula to avoid this?

Expr1: Int(DateDiff("d",[Start Date],Now())/365.25)
& "y " & Int(DateDiff("m",[Start Date],Now()))-Int
(DateDiff("d",[Start Date],Now())/365.25)*12 & "m "

many thanks
D
 
You aren't clear as to what the problem is. How should the 0y12m be
displayed?

--
HTH,

Steve Clark, Access MVP
FMS, Inc.
Professional Solutions Group
http://www.FMSInc.com
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Is your Access database too slow?
Are you ready to upgrade to SQL Server?
Contact us for optimization and/or upsizing!
http://www.FMSInc.com/consulting
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 
Back
Top