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 - Show more from this author
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.
Jan 11, 2018
You can get the last day of the last month as date-Day(date), then this can be
d = Date2Process - Day ( Date2Process ) ;
SerialIncrement ( "00/" ; Month ( d ) ) & Year ( d )
Jan 12, 2018
Thanks for the suggestion.
But I used this custom function for searches, so I really don't need the day.
Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.