We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun 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