Hello, this is a simple exercise in Excel, but I can't get it to work in Alteryx. Here is what I would like to do:
1) Take a Model Year field and subtract by 1 (MY= 2016 becomes 2015)
2) Take the MY-1 and set that to the Year and add August 1 as the Month Day (Output is = 8/1/ [MY-1])
3) Subtract a date in another field from the output (8/1/2019- Output(8/1/2015)= 365)/365= 1
So the output gives the difference between the values as Age in years to 2 decimal places
The equivalent in Excel is like this:
=ROUND((Date 1-("8/1/"&Model Year-1))/365,2)
Thanks!
Solved! Go to Solution.
I think this formula will replicate your excel formula:
Round(DateTimeDiff([Date 1],tostring([Model Year] -1)+"-08-01","days")/365,.01)
That seems to have done the trick!
Thanks!