I want to have a field that will calculate out the years and months a person has been employed at my business. I know the calculations for getting the years is:
if (HasValue(dob)) then
var currDate_ = Date2Num(currDate.formattedValue, "MM/DD/YYYY")
var dob_ = Date2Num(dob.formattedValue, "MM/DD/YYYY")
var diff = currDate_ - dob_
$.rawValue = Floor(diff / 365.25)
else
$.rawValue = null
endif
I want to find it put out so it says 5 years 3 months if that is possible, or something close to that.