Brian Dunning's FileMaker Custom Functions

LastMthSearchRange

Search Range for the Previous Month

  Average rating: 4.3 (38 votes) Log in to vote

Lee Dolereit   Lee Dolereit
Sharp ABT
http://www.sharpabt.com.au

Share on Facebook Share on Twitter

  Sample input:
LastMthSearchRange
  Sample output:
1/5/2009...31/5/2009

  Function definition: (Copy & paste into FileMaker's Edit Custom Function window)

This function is handy for populating a date field in Find mode with the range of Last Month.

 

Comments

David Head   David Head, uLearnIT
Aug 13, 2009
Is this more readable and structured?

Let ([
thismonth = Month ( Get ( CurrentDate ) );
thisyear = Year ( Get ( CurrentDate ) );
startdate = Date ( thismonth - 1; 1; thisyear );
enddate = Date ( thismonth; 0; thisyear )
];
startdate & "..." & enddate
)
 
Lee   Lee, Brisbane , QLD
Aug 16, 2009
Yes , that makes more sense than my version. Many thanks.
 

Log in to post comments.

 

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

Under construction. Email me your wish list for improvements.