Alteryx Designer Desktop Discussions

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

Date time diff not giving desired result

Isha_Gupta
8 - Asteroid

Hey,

 

I have a date column in date data type which needs to be filtered out for the values which are older then 6 months

 

I have used DateTimeDiff(DateTimeNow(),[Date],"months") > 6 in filter.

 

But I am getting values like 2022-09-30, 2022-10-14 which are clearly less then 6 months old.

 

Any solution would help...Thx

4 REPLIES 4
binuacs
20 - Arcturus

@Isha_Gupta Try to change the formula like below

 

DateTimeDiff([Date],DateTimeNow(),'months')

 

binuacs_0-1676989768147.png

 

ShankerV
17 - Castor

Hi @Isha_Gupta 

 

Can you please share few screenshots of the filter tool.

 

As far when I replicated the same in my system, it is working accurately right.

 

ShankerV_0-1676989862732.png

 

Input was:

ShankerV_0-1676990047990.png

 

Output: I do not see 2022-10-14 in the output. Used same formula as yours.

ShankerV_1-1676990066517.png

 

 

Many thanks

Shanker V

Isha_Gupta
8 - Asteroid

Values like 2022-08-10 should have come out of True as it is more then 6 months for that value but it is still coming out of false.

 

Many other such values are failing the filter and either going in true or false when it should have been the opposite.

binuacs
20 - Arcturus

@Isha_Guptayour formula is checking for > 6 months not >= 6 months, if you are looking to include 6 months updated your formula to >= 6

Labels