The Alteryx Community is a finalist in three 2026 CMX Awards! Help us win Customer Support Community, Most Engaged Community, and User Group Program of the Year - vote now! (it only takes about 2 minutes) before January 9.
ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests Early 2026. Make sure to check your account preferences in my.alteryx.com to make sure you have filled out your security questions. Learn more here
Start Free Trial

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

Monthrange in Alteryx

In python, there is this monthrange function which is very useful to find out the days in particular month and also particular year (leap year)

 

In python we will only have to do this to get monthrange

 

 x[i] = calendar.monthrange(Year_S, Month_S)[1]

 

whereas in Alteryx, we will have to do this

 

datetimeday(DateTimeTrim(DateTimeParse([START_DATE],'%Y-%m-%d'),'lastofmonth'))

 

The different are enormous and I can see that Alteryx team was able to add in this in a jiffy.

 

I was hoping we can simplify the code so that users wont have to go and dig around to find a way to get thru.

 

This will be helpful in doing calculations like insurance/interest premium, where we need to find the remaining days of in the month.

1 Comment
AlteryxCommunityTeam
Alteryx Community Team
Alteryx Community Team
Status changed to: Accepting Votes