<< Click to Display Table of Contents >> Navigation: Available Functions > InFiscalYear() |
Syntax
InFiscalYear( <DateValue>, <Year> )
Purpose
To determine if a specific calendar date falls within a specific fiscal year.
Parameters
<DateValue> is usually the name of a calendar date field in DonorQuest.
<Year> is a specific fiscal year.
Returns
InFiscalYear() will return true if <DateValue> falls within the fiscal year specified in <Year>, and false if it does not.
Usage
InFiscalYear() is a true/false function. InFiscalYear() is very similar to the FISCALYEAROF() function, but it differs in that it returns a true/false value instead of a year. Since InFiscalYear() returns a true/false (logical) value, it is designed more for use with selections than with reports.
Once you have told DonorQuest the starting month for your fiscal year, and the current fiscal year (via the fiscal year settings option described in section seventeen), DonorQuest will automatically keep track of the fiscal year donation totals for you. Also, DonorQuest will automatically increment the current fiscal year by one at the end of each fiscal year.
This fiscal year orientation of many organizations makes dealing with calendar dates difficult. For example, if you want to create a selection that would collect all the donations made in fiscal year 2016, you would normally have to create a complex date range condition to check if a given donation date "falls between" the actual calendar dates which make up fiscal year 2016.
The InFiscalYear() function alleviates much of this difficulty. In fact, since DonorQuest knows the beginning fiscal month for your organization, you don't even have to know the range of actual calendar dates which make up your fiscal year. The following InFiscalYear() expression would easily accomplish the selection described above:
Example
InFiscalYear( .Donation_Date., 2016 )
You could also use InFiscalYear() with the CurrentFY() function to select all donations for the current fiscal year. The following line in a Custom selection would accomplish this:
InFiscalYear( .Donation_Date., CurrentFY() )