2 Replies Latest reply on Apr 15, 2014 11:37 AM by NickBoutis

# Calculating lumped expiration dates

### Title

Calculating lumped expiration dates

### Post

I have a FMPro11 database that tracks members, and I want to group their expiration dates (Feb 28, June 30, Oct 31).  I would value any guidance on how to write a calculation to accomplish this.  Where I would like to land is that if I plug in start dates on any day within the four month window spanning December, January, February, or March, Filemaker would calculate an expiration date for the following February 28.   If I plug in a start date of April, May, June, or July, Filemaker would calculate an expiration date for the following June 30th, and so on.

Thanks in advance for any thoughts on how to do this!

Nick B.

• ###### 1. Re: Calculating lumped expiration dates

Let ( [ m = Month ( StartDate ) ; y = year ( startDate ) + 1 ] ;
case ( M < 4 ;  date ( 2 ; 28 ; y ) ;
M < 8 ;   date ( 6 ; 30 ; y ) ;
M < 12 ; date ( 10; 31 ; y ) ;
date ( 2 ; 28 ; y + 1 )   // December start dates
) // case
)// let

• ###### 2. Re: Calculating lumped expiration dates

Thanks PhilModJunk.  That did the trick!

Nick B.