cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Calculating Tenure in years

0 Likes
1,194

We are calculating tenure in years formula for my client ,can anyone help me out with a solution with correction on the below formula using date function. Cust_LastPromotion & Cust_DOJ are columns ids.

round("down",if(cust_LastPromotion="NA",(dateDiff(toDate(cust_DOJ,"dd/mm/yyyy"),toDate("06/06/2021","dd/mm/yyyy"))/365),
(dateDiff(toDate(cust_LastPromotion,"dd/mm/yyyy"),toDate("06/06/2021","dd/mm/yyyy"))/365)))

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Likes

I don't know exactly what your error is, but I know you are using the 'toDate' funciton slightly incorrectly. It should be:

toDate("01/01/2023","dd/MM/yyyy")

Note the "MM" versus your "mm".

Answers (0)