Help

Re: Having trouble with an IS_BEFORE and IF formula!

Solved
Jump to Solution
698 0
cancel
Showing results for 
Search instead for 
Did you mean: 
alinaaks
5 - Automation Enthusiast
5 - Automation Enthusiast

Hi Airtable Community!

I'm not sure what I'm doing wrong with this formula. We are changing our pay rates on April 1st and I want to program my payment field to reflect this change. My table has a date field called "Fecha !!!" and a lookup field for our new rates and our old rates.

If the record has a date before April 1st I want it to use the old rates. If it has a date on or after April 1st I want it to use the new rates. Here's what I have so far! I'm a beginner! Thanks for your patience and  advice 🙂

1 Solution

Accepted Solutions
TheTimeSavingCo
17 - Neptune
17 - Neptune

You don't need the "=TRUE()" bit, and you need to format that April 1st as a date with DATETIME_PARSE(), so you'd end up with something like:

 

IF(
  IS_BEFORE(
    {Fecha !!!},
    DATETIME_PARSE("01 04 2023", "DD MM YYYY")
  ),
  {Old Rate},
  {New Rate}
)

 

See Solution in Thread

2 Replies 2
TheTimeSavingCo
17 - Neptune
17 - Neptune

You don't need the "=TRUE()" bit, and you need to format that April 1st as a date with DATETIME_PARSE(), so you'd end up with something like:

 

IF(
  IS_BEFORE(
    {Fecha !!!},
    DATETIME_PARSE("01 04 2023", "DD MM YYYY")
  ),
  {Old Rate},
  {New Rate}
)

 

alinaaks
5 - Automation Enthusiast
5 - Automation Enthusiast

Thanks so much! Makes perfect sense!