Brian Dunning's FileMaker Custom Functions

LastMonth_withYear ( Date2Process )

Calculate the last month and also include the year

  Average rating: 4.3 (4 votes) Log in to vote

João Coutinho   João Coutinho

Share on Facebook Share on Twitter

  Sample input:
  Sample output:

  Function definition: (Copy & paste into FileMaker's Edit Custom Function window)

When you need to calculate the last month to make searches on the Database, it's difficult to have a good result when you are in January. This function resolves this problem calculating the last month and also including the correct year.



19752   19752, fmc
Jan 11, 2018
You can get the last day of the last month as date-Day(date), then this can be

Let (
d = Date2Process - Day ( Date2Process ) ;
SerialIncrement ( "00/" ; Month ( d ) ) & Year ( d )
João Coutinho   João Coutinho
Jan 12, 2018
Thanks for the suggestion.
But I used this custom function for searches, so I really don't need the day.

Log in to post comments.


Note: these functions are not guaranteed or supported by Please contact the individual developer with any questions or problems.

Under construction. Email me your wish list for improvements.