Click here to Skip to main content
15,868,340 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have date(DD/MM/YYYY) column in oracle database and want to extract financial year from that and display bar chart in crystal reports on change of Financial year...

How dfo I write formula for that...?
Posted

Thanks for ans... It worked but I do not want 'YYYY-MM'... I want financial year (For eg: from date range from 01/04/2013 to 31/03/2014 should return '2013-14'...
 
Share this answer
 
SQL
SELECT    EXTRACT (YEAR FROM ADD_MONTHS (FieldName, -3))
       || '-'
       || EXTRACT (YEAR FROM ADD_MONTHS (FieldName, 9))
  FROM TableName
 
Share this answer
 

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