9 Replies Latest reply on Nov 22, 2016 9:41 AM by amwaterh

# Calculating season based on date ranges

Hi There,

I would like to calculate a field called season based on the following date ranges:

1. March 21 - June 20 = Spring

2. June 21 - September 20 = Summer

3. September 21 - December 20 = Fall

4. December 21 - March 20 = Winter

The year can be disregarded.  Ideally this can be set up in a calculated field type called season_automated.

Amy

• ###### 1. Re: Calculating season based on date ranges

I am going to move this thread from the FileMaker Community Feedback Space, which is specifically for input on the Community itself, to the Discussions Space where others might find your post easier and offer further advice.

TSPigeon

FileMaker, Inc.

• ###### 2. Re: Calculating season based on date ranges

Try:

Case (

yourDate ≥ Date ( 3 ; 21 ; Year ( yourDate )) and yourDate ≤ Date ( 6 ; 20 ; Year ( yourDate )) ; "Spring" ;

yourDate ≥ Date ( 6 ; 21 ; Year ( yourDate )) and yourDate ≤ Date ( 9 ; 20 ; Year ( yourDate )) ; "Summer" ;

yourDate ≥ Date ( 9 ; 21 ; Year ( yourDate )) and yourDate ≤ Date ( 12 ; 20 ; Year ( yourDate )) ; "Fall" ;

"Winter"

)

1 of 1 people found this helpful
• ###### 3. Re: Calculating season based on date ranges

Yes!  This works.  Thank-you

• ###### 4. Re: Calculating season based on date ranges

I played for fun(ction).

Choose ( Div ( Month ( adate ) - ( Day ( adate ) < 21 ) ; 3 ) ; "Winter" ; "Spring" ; "Summer" ; "Fall" ; "Winter" )

get Month() as number, if the Day() is before 21, minus 1

then from Jan 1 to Mar 20 become 0,1,2 so there need no more adjustment

each season have 3 months, so Div(ide) by 3

apply it to Choose(), append a "Winter" for rest of after Dec 21

1 of 1 people found this helpful
• ###### 5. Re: Calculating season based on date ranges

How do I mark Mike_Mitchell’s response to my question as correct?  No actions are available to me.

• ###### 6. Re: Calculating season based on date ranges

Hi,

there should be a "Mark this answer as correct" line for each answer - just select the answer you want.

• ###### 7. Re: Calculating season based on date ranges

Hi

I am unable to make any changes.  I think it’s because TSPigeon<https://community.filemaker.com/people/TSPigeon?et=watches.email.thread> moved my post to another discussion thread so I don’t think I have the privilege to “mark this answer as correct”.  Just speculating though!

Amy

Amy Waterhouse |Geomatics Specialist | PHONE... 250-354-6221

• ###### 8. Re: Calculating season based on date ranges

Hi,

when you click on the Actions button, do you get a perpetual progress bar?  That would indicate the need to clear some browser cache (a bug, imo).  I think it's Form Data or Temporary Internet Files that needs to be cleared.

Otherwise, there are the Mark as Helpful, and Like buttons to try.

• ###### 9. Re: Calculating season based on date ranges

I was able to mark as correct this time!  Thanks again to everyone that responded.