June 26, 200223 yr Please advise proper method for calclating the "time in service" in years, months and days for an employee. Taking into consideration any leap year days. I can arrive at the number of "days" by using the Date2 -Date1, but need to display years, moths and days Thx
June 26, 200223 yr Without getting into the actual calculations, I think that you need to break the dates up into thier composite part and compare then seperately. (i.e. Year2 - Year1, Month2 - Month1, Day2 - Day1)
June 29, 200223 yr This will give you a text field of years, months and days.; based on a StartDate field and today. HowLong = NumToText(Year(Status(CurrentDate)) - Year(StartDate) - If(Status(CurrentDate) < Date(Month(StartDate), Day(StartDate), Year(Status(CurrentDate))), 1, 0)) & " Years, " & NumToText(Mod(Month(Status(CurrentDate)) - Month(StartDate) + 12 - If(Day(Status(CurrentDate)) < Day(StartDate), 1, 0), 12)) & " Months, " & NumToText(Day(Status(CurrentDate)) - Day(StartDate) + If(Day(Status(CurrentDate)) >= Day(StartDate), 0, If(Day(Status(CurrentDate) - Day(Status(CurrentDate))) < Day(StartDate), Day(StartDate), Day(Status(CurrentDate) - Day(Status(CurrentDate)))))) & " Days"
Create an account or sign in to comment