Skip to main content
Solved

Rounding a date to the half year

  • July 3, 2023
  • 5 replies
  • 48 views

Forum|alt.badge.img+3

Hello! I'm new to Airtable and trying to create a formula field based on a date field. The formula should add 1 year to the date (the easy part), then round up to the half year beginning January 1 or July 1. For example,  5/15/23 would calculate 7/1/24; and 10/2/23 would calculate 1/1/25. Any and all help is appreciated!

Best answer by kuovonne

You can see my thought process for coming up with the formula here in Kuovonne's Guide to Airtable.

Here is an early version of the formula. (For a better version of the formula, use the link to my guide.)

5 replies

kuovonne
Forum|alt.badge.img+29
  • Brainy
  • Answer
  • July 3, 2023

You can see my thought process for coming up with the formula here in Kuovonne's Guide to Airtable.

Here is an early version of the formula. (For a better version of the formula, use the link to my guide.)


Forum|alt.badge.img+21
  • Inspiring
  • July 4, 2023

Hello @ML42_2 ,

This formula may also be fine.

DATEADD( DATESTR("7/1/"&YEAR({Date})), IF(MONTH({Date})>=7,18,12), "month" )

 


Forum|alt.badge.img+3
  • Author
  • New Participant
  • July 4, 2023

Awesome thank you! They both do the job, though I'm still trying to figure out how @Sho 's solution works 🙂


kuovonne
Forum|alt.badge.img+29
  • Brainy
  • July 4, 2023

Awesome thank you! They both do the job, though I'm still trying to figure out how @Sho 's solution works 🙂



@ML42_2 wrote:

I'm still trying to figure out how @Sho 's solution works 🙂


It's a neat solution. I added a discussion of it to the page I linked to in my previous post.


Forum|alt.badge.img+21
  • Inspiring
  • July 5, 2023

@kuovonne Excellent explanation!
I agree that using Datetime_parse is a sure thing