Skip to main content
Question

How many years from date

  • March 29, 2022
  • 0 replies
  • 17 views

MeaganMcOlin
Forum|alt.badge.img+7

Hello,

I am looking for a code that will tell me how many years have passed from a certain date. 

For example, we have a field for an employee's Start Date. I would like another field to calculate how many years they have been working here based on today's date. 

Any help would be appreciated! 

Thanks,  

Meagan



------------------------------
Meagan McOlin
------------------------------

This topic has been closed for replies.

MarkShnierYou
Forum|alt.badge.img+24
try this as a numeric formula field

var date HireDate = [my hire date field];

Year(Today())-Year($HireDate)
-
If(
Month(Today())<Month($HireDate)
or
(Month(Today())=Month($HireDate) and Day(Today())<Day($HireDate)),1,0)

------------------------------
Mark Shnier (YQC)
mark.shnier@gmail.com
------------------------------