Click here to Skip to main content
16,021,430 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
hi,


i want to get current financial year


ex:2012-2013
Posted
Comments
[no name] 13-Aug-12 7:00am    
This is not a question.
Kenneth Haugland 13-Aug-12 7:05am    
I dont remember the question, where is my database ? :-)
StianSandberg 13-Aug-12 8:43am    
lol
Kenneth Haugland 13-Aug-12 9:01am    
Seemd like the most likely solution :)
[no name] 13-Aug-12 9:00am    
Did you google that? :-)

How about the OECD database, dont think it gets more complete than that:
http://stats.oecd.org/[^]
 
Share this answer
 
SQL
CREATE FUNCTION [dbo].[fnGetFiscalYear] ( @sysDate DATETIME )
   RETURNS VARCHAR(20)
   AS
   BEGIN
   DECLARE @FiscalYear VARCHAR(20)
   SELECT  @FiscalYear = ( CASE WHEN ( MONTH(@sysDate) ) <= 3
   THEN CONVERT(VARCHAR(4), YEAR(@sysDate) - 1)
   + '-'
   + CONVERT(VARCHAR(4), YEAR(@sysDate))
   ELSE CONVERT(VARCHAR(4), YEAR(@sysDate))
   + '-'
   + CONVERT(VARCHAR(4), YEAR(@sysDate) + 1)
   END )
   RETURN @FiscalYear
   END

SELECT [dbo].[fnGetFiscalYear] ( GetDate() )
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900