Re: Oracle Dates

From: Nevin Hahn <nevin.hahn_at_comcast.net>
Date: Sun, 10 Jan 2010 23:09:15 -0700
Message-ID: <6-qdnRBXO4oNXdfWnZ2dnUVZ_qydnZ2d_at_giganews.com>



I believe the value you are looking for is:

x:=ADD_MONTHS(v_date,3)-v_date

When oracle subtracts dates you get the number in days.

Thanks,

"The Magnet" <art_at_unsu.com> wrote in message news:0e6387e0-d57d-4cf1-b51f-dd391c582f52_at_f5g2000yqh.googlegroups.com...
>
> Is there a way for me to figure out how many days in 3 months? For
> example, say I have this:
>
> x := ADD_MONTHS(v_date,3);
>
> Depending on the value of v_date the months may not be 90, since some
> have 30 and others 31 days.
>
> So, how can I get an integer from those 3 months which are being
> added? If v_date is March, I want 91. If v_date is October, I want
> 92.
>
> Thanks!
Received on Mon Jan 11 2010 - 00:09:15 CST

Original text of this message