Hi - I need a help in formulating difference between two dates in Alteryx.
I have the formula : =MONTH($AB$1)-MONTH(AB23006)+(YEAR($AB$1)-YEAR(AB23006))*12 in excel, this formula will give difference between two dates in a number format.
could anyone help how can i formulate this in Alteryx.
Solved! Go to Solution.
Hi @phemala1 ,
You can use the ' DateTimeDiff(dt1,dt2,u) ' formula for that.
Just set DateTimeDiff([DateEND],[DateSTART],"months")
cheers
Thanks a lot. Yes i used the same formula only and tried in alteryx.
I'm comparing a constant date 04/30/2019 with different dates like 05/15/2019, 06/01/2019 i should get a result of 1 , 2 respectively. But when use the formula DateTimeDiff([DateEND],[DateSTART],"months") all I'm getting in one month lag.
i have attached the excel out of the formula used which does not gives the proper result with that of expected result.
Kindly do the needful.
Hi @phemala1 ,
Use this then:
DateTimeMonth([Period])-DateTimeMonth([Aging from])+(DateTimeYear([Period])-DateTimeYear([Aging from]))*12+1
cheers
Thanks a lot for your swift responses. It works. :) Cheers.