DateWithinFiscalYTD

<< Click to Display Table of Contents >>

Navigation:  Available Functions >

DateWithinFiscalYTD

Syntax

DateWithinFiscalYTD( DateValue> )

 

Purpose

To determine whether or not a given date is within the fiscal year-to-date.

 

Parameters

<DateValue> may be the name of a date field (such as the .Donation_Date. field), but it may also be any value of Date type -- such as the current date returned by the "Date()" function.

 

Returns

DateWithinFiscalYTD() returns true if the date you give it is within the current period you are in for the fiscal year. Today's date is used internally to know how far along you are in the current fiscal year. The date you give is tested within its own fiscal year for being within the fiscal year-to-date. So for example, if your fiscal year starts on July 1st, and today's date is 09/01/2018, dates such as 08/01/2015, 08/05/2016, and 08/15/2017 would all be within the current fiscal year-to-date, but a date such as 09/02/2016 would not since it is just one day past the fiscal year-to-date if today is 09/01/2018. Note that the starting month of the fiscal year for your organization is set under Configure, Program Settings.

 

Usage

DateWithinFiscalYTD() is typically used on reports which give fiscal year-to-date totals.

 

Example

The following examples show the DateWithinFiscalYTD() with some sample dates when a July 1st starting month is set for your organization's fiscal year:

 

CALL

RESULT

Date()

09/01/2018

DateWithinFiscalYTD( CtoD( "08/01/2015" ) )

True

DateWithinFiscalYTD( CtoD( "08/05/2016" ) )

True

DateWithinFiscalYTD( CtoD( "08/15/2017" ) )

True

DateWithinFiscalYTD( CtoD( "09/02/2016" ) )

False

DateWithinFiscalYTD( CtoD( "06/01/2018" ) )

False