Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

Comparing Two Dates

AlteryxLearner23
7 - Meteor

Hi all,

 

I'm trying to compare two dates in the attached file ("Date 1" and "Date 2")

If Date 1 is before Date 2, I would like to show it in the output and if Date 1 is after Date 2, I want to exclude.

For example, in the first row, Date 1 is 30th May 2024 and Date 2 is 15th Feb 2023. Therefore, this can be excluded.

 

Wondering if anyone could help me with this?

 

Thanks in advance!

 

 

3 REPLIES 3
JosephSerpis
17 - Castor
17 - Castor

Hi @AlteryxLearner23 you can do this within a if formula comparing if date  1 is less then date 2 then outputing to a new field which I assumed you were asking for in output. Due to the format of your dates they do need to be converted to a ISO format in order to compare the dates.

 

Compares_Dates_06072023.JPGCompares_Dates_06072023_v2.JPG

AlteryxLearner23
7 - Meteor

Thanks @JosephSerpis - what do you mean when you say that I need to convert the dates to an ISO format?

JosephSerpis
17 - Castor
17 - Castor

Hi @AlteryxLearner23 the screenshot below will explain what I mean about ISO format.

 

Compares_Dates_06072023_v3_ISo.JPG

Labels