Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: return last month
"jobs" <jobs_at_webdos.com> wrote in message
news:1194561672.085769.316410_at_s15g2000prm.googlegroups.com...
> sorry to have to ask this.
>
> How do I return last month in mm format?
>
> For example it's November 8th Today. I'd like to get 10 back. If it
> were January 8th, i'd like to get 12 back.
>
> Thanks.
>
Take a look at the add_months() function, e.g.: select to_char(add_months(sysdate,-1),'mm') from dual
-- Terry DykstraReceived on Thu Nov 08 2007 - 17:02:33 CST
![]() |
![]() |