[]
        
(Showing Draft Content)

SJS.FISCALYEAR

This function returns the fiscal year to which a specified date belongs.

Syntax

SJS.FISCALYEAR(date, [start_month])

Arguments

This function has the following arguments:

Argument

Description

date

A date string or a reference to a cell that contains the date for which you want to determine the fiscal year.

start_month

[Optional] A number from 1 to 12 that specifies the first month of the fiscal year. The default value is 4, which represents a fiscal year beginning in April.

Remarks

  • The returned fiscal year is identified by the calendar year in which the fiscal year begins.

  • If start_month is omitted, the fiscal year begins in April.

  • A date before the specified starting month belongs to the fiscal year that began in the previous calendar year.

  • A date on or after the beginning of the specified starting month belongs to the fiscal year that begins in the same calendar year.

  • If date cannot be interpreted as a valid date, the function returns NaN.

Data Types

Accepts string data or a cell reference. Returns numeric data.

Examples

activeSheet.setFormula(0, 0, '=SJS.FISCALYEAR("2025-03-31")'); // Returns 2024.

activeSheet.setFormula(1, 0, '=SJS.FISCALYEAR("2025-04-01")'); // Returns 2025.

activeSheet.setFormula(2, 0, '=SJS.FISCALYEAR("2025-06-30",7)'); // Returns 2024.