Skip to main content
Solved

Date comparison

  • September 28, 2020
  • 1 reply
  • 70 views

Forum|alt.badge.img+2

hi everyone, is there a formula that can compare 2 dates (a due date and the completion date of a project) and fill in if it was finished on time, early or late?

Best answer by kuovonne

Welcome to the Airtable community!

You can use a variety of date/time comparison formula functions. They are documented in the formula field reference.

Here is one possibility to get you started:

IF( IS_AFTER({due date}, {completion date}), "early",
IF( IS_BEFORE({due date}, {completion date}), "late", 
IF( IS_SAME({due date}, {completion date}), "on time"
)))

1 reply

kuovonne
Forum|alt.badge.img+29
  • Brainy
  • Answer
  • September 28, 2020

Welcome to the Airtable community!

You can use a variety of date/time comparison formula functions. They are documented in the formula field reference.

Here is one possibility to get you started:

IF( IS_AFTER({due date}, {completion date}), "early",
IF( IS_BEFORE({due date}, {completion date}), "late", 
IF( IS_SAME({due date}, {completion date}), "on time"
)))