I have a date parameter :ASOFDATE being entered as such: 01/01/2008.
I would like the following to print out in my columns: 2008-09.
The code I am using to attempt getting this is as follows: to_char(extract(year FROM to_date(:ASOFDATE, 'DD-MM-YYYY'))) || '-' || substr(extract(year FROM to_date(:ASOFDATE , 'DD-MM-YYYY') + 365), 3,2) The information that prints in my column is 8 –
Can you please show me the correct way to write the code so that I can get the desired result of 2008-09? Thank you