In case you missed the announcement: The Alteryx One Fall Release is here! Learn more about the new features and capabilities here
ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests after December 31, 2025. 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

Have a way to easily get date parts out of a date field

Functions such as Year([Date Field]), Month([Date Field]), and Day([Date Field]) would really help with date-based formulas and filter tests.

8 Comments
MarqueeCrew
20 - Arcturus
20 - Arcturus

Until such a time, how about?

 

DateTimeFormat([Date Field],"%Y") >= '2014'

 

------

 

DateTimeFormat([Date Field],"%m") == '10'

 

-----

 

Just a thought....

jdunkerley79
ACE Emeritus
ACE Emeritus

I built some Date functions as a Formula AddIn to do exactly this.

dateFunctions.jpg

 

Code is on GitHub: https://github.com/jdunkerley/AlteryxFormulaAddOns

 

Would be nice to see functions expanded in the next release.

ARich
Alteryx Alumni (Retired)
Status changed to: Under Review

Hi all,

 

Thanks for the idea (and code!). We're looking at re-vamping all of our DateTime functionality across the product, so we'll keep these ideas in mind when those initiatives kick off.

 

Best,

Alex

gsaval
8 - Asteroid

Good news for anyone reading this post, these functions are now available in Alteryx Designer 11.5:

  • DateTimeYear(dt)
  • DateTimeMonth(dt)
  • DateTimeDay(dt)
FreeRangeDingo
ACE Emeritus
ACE Emeritus

@MarqueeCrew suggested -- DateTimeFormat([Date Field],"%Y") >= '2014'

 

Thanks for the suggestion.  I did use this in a recent workflow.  However, for anyone from Alteryx reading this, this is non-intuitive.  '2014' implies that 2014 is a string and will be treated like a string, not an integer.  I didn't try this when I was working it out on my own for that reason.

KylieF
Alteryx Alumni (Retired)
Status changed to: Implemented

Thank you for your idea! This idea was implemented back in 11.5 with the functions: 

  • DateTimeYear(dt)
  • DateTimeMonth(dt)
  • DateTimeDay(dt)
Cndro_Consulting
8 - Asteroid

What function gives the date? for example DateTimeDay(2020-07-05) will give a numeric figure which is 5, what if i want a Sunday?

Cndro_Consulting
8 - Asteroid

You can actually use DateTime to achieve this, convert date to string and use custom method

Type Month for just month and day for day. @FreeRangeDingo  @gsaval @Philip @KylieF @ARich @