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 Discussions

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

first of the month

ntudev
8 - Asteroid

I need a formula to get me 1st of the month from the previous month. So get the date from column 1 (June 7) and in column 2 (May 1st)

 

Column 1              Column 2 ( should be)

2022-06-07         2022-05-01

 

Please help

3 REPLIES 3
IraWatt
17 - Castor
17 - Castor

Hey @ntudev,

This formula does this:

DateTimeTrim(DateTimeAdd([Field1],-1, "months"),"firstofmonth")

IraWatt_0-1654620155814.png

Any questions or issues please ask :)
HTH!
Ira

 

binu_acs
21 - Polaris

@ntudev Another way of doing this.

 

binuacs_0-1654620767754.png

 

HomesickSurfer
12 - Quasar

Hi @ntudev 

 

Another approach:

 

ToDate(DateTimeAdd(DateTimeAdd([OriginalDate],-1,"month"), 1-DateTimeDay(DateTimeAdd([OriginalDate],-1,"month")), "days"))
Labels
Top Solution Authors