Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!
The Product Idea boards have gotten an update to better integrate them within our Product team's idea cycle! However this update does have a few unique behaviors, if you have any questions about them check out our FAQ.

Alteryx Designer Desktop Ideas

Share your Designer Desktop product ideas - we're listening!
Submitting an Idea?

Be sure to review our Idea Submission Guidelines for more information!

Submission Guidelines

Fix DateDiff Function

Highlighted in this post: Solved: DateDiff question - Alteryx Community The DateDiff function under certain conditions does not work as you would expect and I suspect most people would not notice the inaccuracy.

 

Here is the formula for the Results Column below:

 

DateTimeDiff("2022-11-30",[Date],"months")

 

 

Date Expected Result
2022-11-15 0 0
2022-10-31 1 0
2022-09-30 2 2
2022-08-31 3 2

 

 

IraWatt_0-1668445417660.png

 

4 Comments
TheCoffeeDude
11 - Bolide

This sems to be more of a bug rather than a feature request. Have you submitted a support case for this?

AlteryxCommunityTeam
Alteryx Community Team
Alteryx Community Team
Status changed to: Accepting Votes
 
danilang
19 - Altair
19 - Altair

Hi @TheCoffeeDude 

 

This is not a bug since the function is working as defined in the documentation. For all the intervals types the difference between the two dates needs to be larger than a standard unit in order for the function to increment the count.   A standard unit is somewhat fluid when referring to "months" and "years" since their length can vary.  While one can argue the merits of  @IraWatt's suggestion, changing the behaviour at this point in would break too many existing workflows. 

 

Dan 

IraWatt
17 - Castor
17 - Castor

Great point @danilang, I think a nice middle ground then would be the introduction of another function which can work with the varying lengths of months/years.