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
http://www.joaocoutinho.net |
01/02/2018
01/2018
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.
Comments
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 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.