Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ADD_MONTHS - Can I add half a month onto a date?

user479119Sep 27 2006 — edited Sep 28 2006
Hi

I need to add half a month onto a date field, i.e.

If the day is the '15th' e.g. 15/12/2004, then set the final date to be 01/01/2005 (1st of the next month)

If the day is the 1st e.g. 01/12/2004, then set the final date to be 15/12/2004. (15th of the same month)

I have tried to use ADD_MONTHS (date_field, 0.5), however this brings back the date field value with nothing added on. I think it rounds it down to 0.

Can anyone please help with a solution for this?

Thanks
GB
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 26 2006
Added on Sep 27 2006
6 comments
1,919 views