Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

This topic is 7234 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

OK - what I want to do seems straightforward but it is driving me crazy! I have a start date and end date of an event. Say start date is : 19/1/05 and end date is 15/4/05. I want a field to store month values for all months this event covers. ie: January, February, March and April. These need to be separated by carriage returns (for formatting as a check box set). Any help is appreciated.

Posted

Try:

Let ( [

startMonth = Month ( StartDate ) ;

endMonth = Month ( EndDate ) ;

n = endMonth - startMonth + 12 * ( endMonth < startMonth ) + 1 ;

list =

"January

Posted

Comment, you only partially accounted for durations which cross into a new year. You will need to modify the formula to this:

Let ( [

startMonth = Month ( StartDate ) ;

endMonth = Month ( EndDate ) ;

n = endMonth - startMonth + 12 * ( endMonth < startMonth ) + 1 ;

list =

"January

Posted

Thanks for catching that. As long as we are at it - it's also possible to start in December 2003 and end in January 2005. So let's make it:

Let ( [

startMonth = 12 * Year ( StartDate ) + Month ( StartDate ) ;

endMonth = 12 * Year ( EndDate ) + Month ( EndDate ) ;

n = endMonth - startMonth + 1 ;

startPos = Month ( StartDate ) ;

list =

"January

This topic is 7234 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.