Help

Welcome to the Airtable Community! If you're new here, check out our Getting Started area to get the most out of your community experience.

If or Switch Functions with Dates

Topic Labels: Formulas
Solved
Jump to Solution
143 1
cancel
Showing results for 
Search instead for 
Did you mean: 

I need to compare two date fields to get a specific result. I am not an expert at Airtable, so my explanation isn’t very good :). My base is for tracking training. I need to mark a month “excused” if a person’s hire date is after the meeting date and then mark the month as completed or missed if their hire date is before the meeting date. The hire date is 9/1/2022, and the meeting date is 10/1/2022. That person is required to complete the monthly program. Any suggestions on a formula? - Wendy in Michigan.

1 Solution

Accepted Solutions

This is a job for IFs. You didn’t indicate what should happen if Hire is exactly the same as meeting (neither before no after), so I’m assuming the program is required if the dates are the same.

IF(
  AND({Hire Date}, {Meeting Date}),
  IF(
    {Hire Date} > {Meeting Date},
    "Excused",
    IF(
      {Completed?} = "yes",
      "Completed",
      "Missed"
    )
  )
)

^ This assumes you have a field called {Completed?} which marks whether someone has completed their program.

See Solution in Thread

1 Reply 1

This is a job for IFs. You didn’t indicate what should happen if Hire is exactly the same as meeting (neither before no after), so I’m assuming the program is required if the dates are the same.

IF(
  AND({Hire Date}, {Meeting Date}),
  IF(
    {Hire Date} > {Meeting Date},
    "Excused",
    IF(
      {Completed?} = "yes",
      "Completed",
      "Missed"
    )
  )
)

^ This assumes you have a field called {Completed?} which marks whether someone has completed their program.