Help

Re: If or Switch Functions with Dates

Solved
Jump to Solution
717 0
cancel
Showing results for 
Search instead for 
Did you mean: 
Wendy_Yelsik
6 - Interface Innovator
6 - Interface Innovator

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
Kamille_Parks
16 - Uranus
16 - Uranus

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
Kamille_Parks
16 - Uranus
16 - Uranus

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.