I have an If Then Formula that is working as expected in Excel however when it is translated into Alteryx it returns a 0. I confirmed the formulas match so I'm not sure why Alteryx isn't calculating as expected? Essentially it's "if tonumber([End Date])- tonumber([User.Current Period End Date])-365 > 0 then tonumber([End Date])- tonumber([User.Current Period End Date])-365 else 0 endif"
Solved! Go to Solution.
Hi @Brown17 ,
Is the [End Date] Field Date Type or Int Type?
If the [End Date] Field is Date Type, the ToNumber function does not return the correct elapsed days.
Please use the DateTimeDiff function to get the elapsed days from the two days
@Brown17
As @AkimasaKajitani suggested, we have to follow the way of Alteryx for calculating Datetime.
below is a quick sample.
Thank you!