Alteryx designer Discussions

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

Date Subtraction with Today's Date

Highlighted
6 - Meteoroid

Hello 

 

I been trying to figure out why part of this is working correctly and part is not. I am needing to populate a cell if the cancel date is greater than 400 days from today's date. I have tried rearranging the order of the formula and that is not working. Please see an example workflow attached and hopefully someone can tell me why this is not working for all rows. 

 

Thanks Bunches!

 

 

Highlighted
Alteryx Certified Partner
Alteryx Certified Partner

Hello @MelGibson 

 

You could use the datetimediff function for that:

 

datetimedif(Datetimetoday(),[Date], 'days') > 400

 

Untitled.png

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Regards

Highlighted
Alteryx Certified Partner
Alteryx Certified Partner

Hi @MelGibson ,

 

you have to convert the date in the [CAN_DT] column to a proper date format - then you can use DateTimeDiff to calculate the difference between today and the cancel date. I've modified your workflow a bit. Hope it works now as expected.

 

Best,

 

Roland

Highlighted
6 - Meteoroid

Thank you this worked just needed to modify it to not add additional columns and to drop it in the designated column. I appreciate your help. 

Highlighted
6 - Meteoroid

This worked exactly as I needed it with the columns. Thank you for the help.

Labels