Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
berryandcherry6
Creator II
Creator II

Months Comparison in if condition

Hi,

i have below formula

if(match(Date(MonthStart(today())-1,'MMM')='mar','apr')>0,1,2)

If previous month is mar or apr, i need to display as 1.  But it always displays else part. ie 2.

Whats wromg in my code?

1 Solution

Accepted Solutions
aarkay29
Specialist
Specialist

if(match(Date(MonthStart(today())-1,'MMM'),'Mar','Apr'),1,2)

View solution in original post

1 Reply
aarkay29
Specialist
Specialist

if(match(Date(MonthStart(today())-1,'MMM'),'Mar','Apr'),1,2)