Help

What is wrong with this IF Statement?

Solved
Jump to Solution
1043 3
cancel
Showing results for 
Search instead for 
Did you mean: 
Abraham_Bochner
8 - Airtable Astronomer
8 - Airtable Astronomer

What is wrong with this IF Statement?

Screenshot_37

1 Solution

Accepted Solutions
Jeremy_Oglesby
14 - Jupiter
14 - Jupiter

It’s missing an opening parenthesis, and it’s got an an unparsed date string.
You need to use DATETIME_PARSE() to parse the string into a DateTime object to compare with your Date field.

Also, you may want to use the IS_AFTER() date comparison function.
image

I think this should be your equivalent formula:

IF(
   IS_AFTER(
      {purchase-date},
      DATETIME_PARSE("02/01/2020", 'MM/DD/YYYY')
   ),
   "Yes",
   "No"
)

See Solution in Thread

3 Replies 3
Jeremy_Oglesby
14 - Jupiter
14 - Jupiter

It’s missing an opening parenthesis, and it’s got an an unparsed date string.
You need to use DATETIME_PARSE() to parse the string into a DateTime object to compare with your Date field.

Also, you may want to use the IS_AFTER() date comparison function.
image

I think this should be your equivalent formula:

IF(
   IS_AFTER(
      {purchase-date},
      DATETIME_PARSE("02/01/2020", 'MM/DD/YYYY')
   ),
   "Yes",
   "No"
)
Abraham_Bochner
8 - Airtable Astronomer
8 - Airtable Astronomer

Thanks you very much

You’re welcome :slightly_smiling_face: