Software Venture Consulting

FileMaker Pro downloads & Resources
FileMaker Custom Functions
FileMaker Web Viewer Examples
FileMaker Pro & Lasso Consulting
FileMaker Books
FileMaker Articles
FileMaker Error Reference

Free Web Tools
Free FileMaker Tools

Personal Pages

Shopping Cart
Shopping Cart


Free Newsletter


Privacy Policy

FileMaker is a registered trademark of FileMaker, Inc. in the U.S. and other countries.


 FileMaker Pro Custom Functions

List  |  Show Random  |  Upload  |  Add This to Your Site


Rate this function:  

  Average rating: 4.6  (21 votes)
  Discuss this Custom Function

Maria del Rocio Moguel, UT MD Anderson Cancer Center

Gives the exact date of one month earlier

Sample Input:
Sample Output:

 Then copy & paste into FileMaker Advanced's Edit Custom Function window.


This function takes into account the different lengths of the months (30, 31, 28) so in case the day number of the DateFrom is 31, it will place the correct day number for the previous month. (It does not take into consideration a leap year; it will use Feb 28).

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

This is my Custom Function and I want to edit it


5 most recent comments | Show all 9 comments

Here is another one.
put -1 as months parameter get the result you want.

and simplify it

guess = Date(Month(startDate) + months; Day(startDate); Year(startDate));
guess - Case ( Day (guess) <> Day (startDate) ; Day ( guess ) )

unix, Japan
April 13, 2015 5:25pm

Yes, Bernand Moreau. Thank you for noticing. I corrected it.

Rocio, Houston, TX
April 14, 2015 5:49am

What is purpose of this function?

Enter 10/31 returns 9/30
Enter 10/30 returns 9/30
Enter 3/31 returns 2/28
Enter 3/30 returns 2/28
Enter 3/29 returns 2/28

Lesser days do return the same day in the prior month.
I just don't see a practical use. Explain.

Jeep Watson, Baltimore, MD
April 14, 2015 9:36pm

Jeep Watson, I created the function because I need to send some paperwork one month before the due date (not just 30 days each time). If the due date is October 31 or October 30, the function will give me September 30 because September only has 30 days. It would be incorrect to have 9/31. The same happens for March; if the due date is the last day of March, I have to send the paperwork the last day of February, which only has 28 days.
This function may not be useful for you if you don't have a similar scenario, but at least, it works for my situation.
Thank you for your comments.

Rocio, Houston, TX
April 15, 2015 5:52am

Hi, I would like to keep the invitations in my inbox so that I can later secarh & find them. (otherwise, we will need a secarh engine which also indexes the calendar).In current v3.1.3, when I accept an invitation, it is deleted from my inbox. I could not find an option not to do it (Outlook has such an option).Thanks.

Samuel, k9ZgA5ytGf
November 27, 2015 10:11am

Make a comment about this Custom Function (please try to keep it brief & to the point). Anyone can post:

Your Name:
characters left. If you paste in more than 1500 characters, it will be truncated. Discuss the function - advertisements and other useless posts will be deleted.
Answer 1 + 2 =
Search for Custom Functions:

Custom Functions Widget
Download the Custom Function Dashboard Widget for OS X
Keep all the latest Custom Functions right at your fingertips!

Newest Custom Functions:

1. HexUUIDToNum_cf (_uuid)
  (Sat, Jun 16, 1:55pm)
2. httpResponseCode ( responseHeaders )
  (Tue, Jun 12, 10:40pm)
3. FindDuplicateCharacters ( string )
  (Fri, Jun 08, 5:01pm)
4. FieldRepetitionLast ( field ; maxRepetition )
  (Wed, Jun 06, 6:05pm)
5. CountModifiedRecords ( NameTimestampField ; StartTimestamp ; EndTimestamp )
  (Mon, May 28, 8:23am)
6. JSONArrayLength ( JSONArrayStr )
  (Fri, May 25, 7:46am)
7. interpolation (y1; y2; y3; x1; x2; x3; x1y1; x2y1; x1y2; x2y2; rnd)
  (Sat, May 19, 3:55am)
8. @JSONFormatElements ( json )
  (Tue, May 15, 3:31am)

RSS Feed of Custom Functions