MonthEnd ( )

Function stats

Average user rating
166
309
9999
Support
FileMaker 7.0 +
Date posted
19 May 2011
Last updated
19 May 2011
Version
Recursive function
No

Author Info
 Josh Ormond

3 functions

Average Rating None

author_avatar



 

Function overview

Prototype

MonthEnd  ( StartDate;   Months )


Parameters

StartDate  a field or any expression that returns a valid Date.


Months  the number of months to roll forward.


Description

Tags:  Month, Date, End, Last  

Returns the date of the last day of the month the specified number of months from the StartDate.

Enter 0 for the Months to return the current month's end.

Examples

Sample input

1. MonthEnd ( "12/10/2011" ; 0 )
2. MonthEnd ( "12/10/2011" ; 1 )
3. MonthEnd ( "12/10/2011" ; 2 )


Sample output

1. 12/31/2011
2. 1/31/2012
3. 2/29/2012

 

Function code

/*

MonthEnd ( StartDate ; Months )
Purpose:    Returns the date of the last day of the month the specified number of months from the StartDate.
Author:    Josh Ormond

*/

Date ( Month ( StartDate ) + ( Months + 1 ) ; 0 ; Year ( StartDate ) )

// ===================================
/*

    This function is published on FileMaker Custom Functions
    to check for updates and provide feedback and bug reports
    please visit http://www.fmfunctions.com/fid/309

    Prototype: MonthEnd( StartDate; Months )
    Function Author: Josh Ormond (http://www.fmfunctions.com/mid/166)
    Last updated: 19 May 2011
    Version: 1.1

*/
// ===================================

 

 

 

 

 

 

 

Top Tags

Text Parsing  (33)
List  (32)
Date  (28)
XML  (27)
Format  (23)
Sql  (22)
Dev  (20)
Debug  (17)
Interface  (15)
Layout  (15)
Text  (14)
Variables  (13)
Filter  (12)
Layout Objects  (11)
Design  (10)
Array  (8)