Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

How to use Yearfrac(30/360) formula of excel Alteryx

Mr_Brown
7 - Meteor

We have to calculate the age using the yearfrac formula in excel. For example if some one born in 25th December 1999, the calculation of days would be 5 days of december and so on, however if can't do the same using datetimedifference formula in the alteryx as it will take this as 6 days and all the calculation would be wrong. 

 

Attached is the screenshot of yearfrac.

 

Yearfrac.PNG

3 REPLIES 3
TomWelgemoed
12 - Quasar

Hi, 

 

What is your end date (in your example of 25th December 1999? I assumed 30-Dec-2019, but when I do that in Excel I get a value of 20.01.

 

Not used YEARFRAC before, so apologies if it's a silly question!

danilang
19 - Altair
19 - Altair

Hi @Mr_Brown 

 

Check out this post.  It contains a solution for a similar problem, the Days360 function.  You can probably adapt the logic used for the 30-day Month calculations to solve your fractional year issue.

 

Dan 

danilang
19 - Altair
19 - Altair

Hi @Mr_Brown 

 

After looking "Day count convention" and replicating the US 30/360 section I've come up with possible solution.  The entire algorithm is wrapped in one formula tool.  It seems to replicate the results that Excel gives me, but try it out and let me know

 

r.png

 

Dan

 

 

 

 

 

 

Labels