Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

Alteryx Designer Desktop Discussions

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

How to find difference between two dates

dizy_11
7 - Meteor

Hi all,

 

I have two date columns given as:

Reporting Month
August 2019

 and 

Approved Date
2017-03-08

 

I want to find out difference between these two dates in number of months.

Can anyone please help me with this.

 

Thanks!

3 REPLIES 3
apathetichell
20 - Arcturus

this assumes your two columns are in the same workflow and the second date is march 8th, 2017 - not august 3rd, 2017... basically the formula is:

datetimediff(datetimeparse(getword([Reporting Month],1)+getword([Reporting Month],0)+"01","%Y%B%d"),[Approved Date],"months")

 

this does all the transformation work for the first value and plugs it into a datetimediff formula.

dizy_11
7 - Meteor

thanks alot. it worked for me.

Vaithi
7 - Meteor

Hi Deeksha1997,

 

Another simple workflow if the reporting date and approved date are in two different file.  Hope this helps 🙂

Labels
Top Solution Authors