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 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

Date Time first and last of month

I'd like to see the DateTimeLastOfMonth and DateTimeFirstOfMonth functions be more flexible then just getting the first or last date of the current month. It would be great if you could point to a date field and have it give the first or last date of that month. i.e  DateTimeLastOfMonth([randomdate]) and if the [randomdate] = December 3rd, 1981, the result would bring back 1981-12-31

5 Comments
ChrisTX
16 - Nebula
16 - Nebula

DateTimeTrim does this

 

DateTimeTrim(dt,t): Remove unwanted portions of a DateTime and return the modified DateTime

 

Parameters
   dt: DateTime data, expressed as a selected column or a specified DateTime value between quotes.

   t: Trim type. Options include:

 

  • firstofmonth:  trim to the beginning of the month (this does the same as month)
  • lastofmonth: extend to one second before the end of the last day of the month

 

https://help.alteryx.com/current/Reference/Functions.htm

 

Willi
7 - Meteor

That's worked perfectly! Thank you @ChrisTX 

KylieF
Alteryx Community Team
Alteryx Community Team
Status changed to: Implemented

Hi all!

 

I'm going to update this idea to implemented since as @ChrisTX pointed out this idea is currently available in the product. Thank you again ChrisTX for bring up this feature and thank you both for partaking in the product idea boards!

GreGG24
5 - Atom

I'm trying to use this function now but it seems that the particular parameter firstofmonth does not work now. Can someone please enlighten me?

thomasmaher
5 - Atom

This is an example of the formula that works for me:

 

DateTimeTrim([OrderDate],"firstofmonth")