Crystal Reports – How to calculate financial year from date

The following code shows how to calculate the financial year from a date in a Crystal Reports.

It uses the Australian financial year which is from July to June, e.g. July 2017 to June 2018 = the 2017/2018 financial year.

To use, create a new ‘Formula Field’, insert the code and update with your date field.

IF Month ( {Date} ) <= 6
THEN ToText( Year ( {Date} ) - 1, 0, "" ) + '/' + ToText( Year ( {Date} ), 0, "" )
ELSE ToText( Year ( {Date} ), 0, "" ) + '/' + ToText( Year ( {Date} ) + 1, 0, "" )

Was this article helpful?

Related Articles