Skip to main content
Solved

IF statement with first day of 6 months ago

  • March 16, 2023
  • 2 replies
  • 19 views

Forum|alt.badge.img+3

Hello everyone, 

I'd like to make a formula with an IF statement that shows "OK" if a date is in the last 6 complete months. 

For example, if today is the 17th of March, it would show "OK" for every record since the 1st of September.

Is this something possible?

Thanks 🙂

Best answer by TheTimeSavingCo

Yeap:

IF( IS_AFTER( Date, DATEADD( DATEADD( DATETIME_PARSE( "01 " & DATETIME_FORMAT( TODAY(), "MM YYYY" ), "DD MM YYYY" ), "-6", "months" ), "-1", "days" ) ), "Yes", "No" )

2 replies

TheTimeSavingCo
Forum|alt.badge.img+31

Yeap:

IF( IS_AFTER( Date, DATEADD( DATEADD( DATETIME_PARSE( "01 " & DATETIME_FORMAT( TODAY(), "MM YYYY" ), "DD MM YYYY" ), "-6", "months" ), "-1", "days" ) ), "Yes", "No" )


Forum|alt.badge.img+3
  • Author
  • New Participant
  • March 17, 2023

Yeap:

IF( IS_AFTER( Date, DATEADD( DATEADD( DATETIME_PARSE( "01 " & DATETIME_FORMAT( TODAY(), "MM YYYY" ), "DD MM YYYY" ), "-6", "months" ), "-1", "days" ) ), "Yes", "No" )


That's awesome. Thank you so much!