How to calculate Fiscal year based on date
2823391May 9 2011 — edited Mar 20 2013HI all,
I have a sql statement which simply queries a single table. The table contains an 'effective date' i.e. to_date('01/09/2010', 'dd/mm/yyyy').
I am creating a view based on this query and want to append a psedo column with the dates fiscal year! the fiscal year we are using is the 01/08/.... tot he 31/07/....
I have been trying a few things and found this example on the net which i have been pkaying with, but am completelty clueless as to where the 83days comes in??
select 'FY'||trunc(trunc(to_date('01/09/2010', 'dd/mm/yyyy') + interval '83' day), 'Y') from dual;
I would be really interested to see how you think this can be done.
Thanks