Subtracting 1 month from date and formatting to (mmm-yy) i.e.APR-06
Posted on 2006-04-28
I have a date that I'm inserting into a table 'FRA' and I want to also include another column called 'REPORT_DATE' in the table besides the timestamp called 'INSERT_DATE'.
Here is what 'INSERT_DATE' looks like 2006-04-28 13:39:09.577. I want to take this date and subtract 1 month from it and format in the following way: mmm-yy. An example of the formated date for 2006-04-28 13:39:09.577 would be APR-06, but I also want to subtract one month so it would really be "MAR-06" based on the 2006-04-28 13:39:09.577. thanks.