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. Set up your security questions now so you can recover your account anytime, just log out and back in to get started. Learn more here
Start Free Trial

Alteryx Designer Desktop Discussions

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

last day of previous month

wenyg
8 - Asteroid

Hi

  How to extract the last day of previous month without any input column?

  For example, as of Feb 9 2023 (today), I want to pull the date like this "31-Jan-23". Thanks!

4 REPLIES 4
willemb
7 - Meteor

Use this formula: DateTimeAdd(DateTimeTrim(DateTimeToday(),'month'),-1,'day')

Felipe_Ribeir0
16 - Nebula

Hi @wenyg 

 

First formula will get the last day of the last month (2023-01-31)

 

Second formula will transform 2023-01-31 into 31-Jan-23

 

Felipe_Ribeir0_0-1675950007117.png

 

wenyg
8 - Asteroid

Thanks,

   How to convert EndofLastMonth to "28-Feb-23" afterwards?

Felipe_Ribeir0
16 - Nebula

Hi @wenyg 

 

End of current month, right?

 

Felipe_Ribeir0_0-1675957493409.png

 

Labels
Top Solution Authors