Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Date Time Diff with two specifiers"Years" and "Months"

alphabex18
8 - Asteroid

Hi all, 

 

I am working with a date time diff formula to create a new column for "Time with Company" and would like output to be years and months..i.e., 2.5 (2 years and 6 months). The DateTimeDiff calculation only allows for one of the options, either years or months. I assume there is a way to calculate this, but i cant seem to wrap my head around it. 

 

(DateTimeDiff([GroupTermDate],[GroupMedicalEnrollDate],"Years")

 

Thanks ahead of time

 

2 REPLIES 2
Thableaus
17 - Castor
17 - Castor

Hi @alphabex18 

 

Have you tried (DateTimeDiff([GroupTermDate],[GroupMedicalEnrollDate],"months")/12 

 

Cheers,

alphabex18
8 - Asteroid

Excellent! Works perfectly. Thank you

Labels