It seems a simple request, but get’s complicated quickly as there’s either 30 or 31 days in a month, and to make matters even more complicated there’s 28 days in February but only 3 out of every 4 years…’

Deep breath. Delete all those thoughts…

 

 

 

 

 

 

 

 

Just think. The last day of the month is always 1 day before the 1st day of the next month.

So depending on exactly what the request is, use a variety of FileMaker functions…

get(CurrentDate)
Date ( month ; day ; year )
Day ( date )
Month ( date )
Year ( date )

So the ‘date’ of the last day of this month is…
Date ( Month ( get(CurrentDate ) + 1 ; 1 ; Year ( get(CurrentDate ) ) – 1

The ‘Month ( get(CurrentDate ) + 1’ bit is next month
And the ‘- 1’ at the right is one day earlier

And just the last day of this month is…
Day ( Date ( Month ( get(CurrentDate ) + 1 ; 1 ; Year ( get(CurrentDate ) ) – 1 )

OK the date of the last day of next month gets interesting if it now December but then how about introducing a case statement…

Month ( get(CurrentDate ) = 12