DaysIntoFiscalYear()

<< Click to Display Table of Contents >>

Navigation:  Available Functions >

DaysIntoFiscalYear()

Syntax

DaysIntoFiscalYear( DateValue> )

 

Purpose

To determine the number of days a given date is into the fiscal year for the 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

DaysIntoFiscalYear() returns the number of days between the start of the fiscal year for your organization and a specific date. The date you give is checked within its own fiscal year, so leap years are accounted for. For example, if your fiscal year starts on July 1st, 07/15/2018, would be 14 days into the fiscal year. Likewise, 08/01/2018 would be 31 days into the fiscal year for that date, and 03/01/2019 would be 243 days into the fiscal year for that date. Note that the starting month of the fiscal year for your organization is set under Configure, Program Settings.

 

Usage

DaysIntoFiscalYear() is typically used in custom selections (queries).

 

Example

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

 

CALL

RESULT

Date()

09/01/2018

DaysIntoFiscalYear( CtoD( "07/15/2008" ) )

14

DaysIntoFiscalYear( CtoD( "07/15/2018" ) )

14

DaysIntoFiscalYear( CtoD( "08/01/2018" ) )

31

DaysIntoFiscalYear( CtoD( "03/01/2019" ) )

243

DaysIntoFiscalYear( CtoD( "06/30/2016" ) )

364