This is a way to get current financial year using SQL query:
- DECLARE @FIYear VARCHAR(20)
-
- SELECT @FIYear = (CASE WHEN (MONTH(GETDATE())) <= 3 THEN convert(varchar(4), YEAR(GETDATE())-1) + '-' + convert(varchar(4), YEAR(GETDATE())%100)
- ELSE convert(varchar(4),YEAR(GETDATE()))+ '-' + convert(varchar(4),(YEAR(GETDATE())%100)+1)END)
-
- SELECT @FIYear AS F_YEAR
Output: