Any idea how I could return the month using the below conditions
Output Column: NEW DATE
If [MYDATE] = Monday AND [Day of Month = 1, 2 or 3)
or [MYDATE] = [Day of Month] = 1
Then Month = Previous month
Else Month = Current month
Thanks for your help!
Solved! Go to Solution.
Hi @marc_allen, from your logic I think I've created what you're after - does this look like what you had in mind? The main expression is the third one, kept the others in to show the logic throughout.
IF (DateTimeFormat([MYDATE],'%A') = 'Monday' AND DateTimeDay([MYDATE]) IN (1,2,3)) OR DateTimeDay([MYDATE]) = 1
THEN DateTimeFormat(DateTimeAdd([MYDATE], -1, 'month'),'%B')
ELSE DateTimeFormat([MYDATE], '%B')
ENDIF
Amazing! Perfect first time - thanks so much! :-)