Alteryx Designer Desktop Discussions

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

Determining difference of days between arrival date and current date.

JacobGFMR
7 - Meteor

The answers provided to similar questions still create an error form. 

The arrival date is provided (MM/DD/YYYY), and I need to know the difference between that date and the current date. 

 

JacobGFMR_0-1616798161786.png

 

How to determine the difference in days between the arrival at queue date and the current date. 

7 REPLIES 7
Luke_C
17 - Castor

Hi @JacobGFMR 

 

You can use the datetime functions for this.

 

The below formula should work. It will take the difference of the two days. The datetimeparse is used to get the arrival date into the alteryx date format (yyyy-mm-dd).

 

DateTimeDiff(DateTimeToday(),datetimeparse([ARRIVAL AT QUEUE21],'%m/%d/%Y'), "days")

JacobGFMR
7 - Meteor

I apologize. I was working with an incorrect column. 

I need to determine how many days from the current date this date is in this column.

JacobGFMR_0-1617020911976.png

 

Example:

How many days is 2021-03-23 from the current date. 

Luke_C
17 - Castor

You'd use the same formula, just update the field.

 

The syntax is datetimediff(date1, date2, units). So:

 

DateTimeDiff(DateTimeToday(),[SCAN DATE], "days")

 

Scan date looks to be in the correct format so no date parsing is needed

JacobGFMR
7 - Meteor

I am getting this error:

JacobGFMR_0-1617021300115.png

 

JacobGFMR_1-1617021376614.png

 

Luke_C
17 - Castor

@JacobGFMR you need to name the new column. You can do so in the top left where it says "select column"

ken_yap_au
8 - Asteroid

You need to give the field a name in the [Select Column] drop down. 

Luke_C
17 - Castor

Also you do not need "datetimeparse(" in the formula.

Labels