Get Current Financial Year Using SQL Query

This blog show how to Get Current Financial Year Using SQL Query.

This is a way to get current financial year using SQL query:

  1. DECLARE @FIYear VARCHAR(20)    
  2.     
  3. SELECT @FIYear = (CASE WHEN (MONTH(GETDATE())) <= 3 THEN convert(varchar(4), YEAR(GETDATE())-1) + '-' + convert(varchar(4), YEAR(GETDATE())%100)    
  4.                         ELSE convert(varchar(4),YEAR(GETDATE()))+ '-' + convert(varchar(4),(YEAR(GETDATE())%100)+1)END)    
  5.     
  6. SELECT @FIYear AS F_YEAR    
Output:

output