Prev6Mos ( )

Function stats

Average user rating
295
310
9999
Support
FileMaker 7.0 +
Date posted
21 May 2011
Last updated
23 September 2011
Version
Recursive function
No

Author Info
 Atalanta

2 functions

Average Rating None

author_avatar



 

Function overview

Prototype

Prev6Mos  ( refdate )


Parameters

refdate  your reference date for prev 6 month block must be valid date


Description

Tags:  Date  

This function calculates the previous six-month block - either January to June or July to December based on the reference date. You can use Get(CurrentDate) so that it will cycle based on the current date or you can specify a date. This can then be used to set a variable for a find or a report (substitute "to" for "..." to get 07/01/2010 to 12/31/2010).

Examples

Sample input

Prev6Mos(Get(CurrentDate))


Sample output

07/01/2010...12/31/2010 (When the current date is 03/17/2011)

 

Function code

If(Month(refdate)<7; ("07/01/"&Year(refdate)-1 &"..." &"12/31/"&Year(refdate)-1); ("01/01/"&Year(refdate ) &"..." &"06/30/"&Year(refdate)))

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

    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/310

    Prototype: Prev6Mos( refdate )
    Function Author: Atalanta (http://www.fmfunctions.com/mid/295)
    Last updated: 23 September 2011
    Version: 2.0

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

 

 

 

 

 

 

 

Top Tags

Text Parsing  (31)
List  (28)
Date  (26)
Format  (23)
XML  (22)
Dev  (19)
Sql  (18)
Debug  (16)
Interface  (13)
Text  (13)
Layout  (13)
Variables  (12)
Filter  (11)
Design  (10)
Layout Objects  (8)
Timestamp  (7)