Help

Help with Date Range Formula...if Due Date field is between 1/1/2022 and 3/31/2022 then "Q1 2022" and so on

Topic Labels: Formulas
746 1
cancel
Showing results for 
Search instead for 
Did you mean: 
LaToya_Williams
4 - Data Explorer
4 - Data Explorer

Hello hello Airtable Fam. I have a question about formulas. So I have a “Due Date” field that I want to use as my constant to determine what Quarter of the year it’s in over 3 years.

So I want a formula that will calculate:
if the due date is between 1/1/2022 and 3/31/2022 that I’ll get a value of Q1 2022 OR
if the due date is between 4/1/2022 and 6/30/2022 that I’ll get a value of Q2 2022 OR
if the due date is between 7/1/2022 and 9/30/2022 that I’ll get a value of Q3 2022 OR
if the due date is between 10/1/2022 and 12/31/2022 that I’ll get a value of Q4 2022 OR
if the due date is between 1/1/2023 and 3/31/2023 that I’ll get a value of Q1 2023 OR
if the due date is between 4/1/2023 and 6/30/2023 that I’ll get a value of Q2 2023 OR
if the due date is between 7/1/2023 and 9/30/2023 that I’ll get a value of Q3 2023 OR
if the due date is between 10/1/2023 and 12/31/2023 that I’ll get a value of Q4 2023 OR
if the due date is between 1/1/2024 and 3/31/2024 that I’ll get a value of Q1 2024 OR
if the due date is between 4/1/2024 and 6/30/2024 that I’ll get a value of Q2 2024 OR
if the due date is between 7/1/2024 and 9/30/2024 that I’ll get a value of Q3 2024 OR
if the due date is between 10/1/2024 and 12/31/2024 that I’ll get a value of Q4 2024

Or is this even possible or maybe there’s an easier way.

HELP!

1 Reply 1

Welcome to the Airtable community!

CONCATENATE(
    "Q",
    DATETIME_FORMAT( {Due Date}, "Q" ),
    " " & YEAR({Due Date})
)

You can learn more about the individual formula functions in the formula field reference.