Skip to Main Content

Analytics Software

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!

timestampadd 6 months ago

user11367442Dec 21 2009 — edited Jan 4 2010
How do I do a timestampadd function so that it gives me the first day of the month 6 months ago?

For example, a user selects 10/31/2009. I need a column that will return the 1st of the month 6 months prior which is 5/1/2009. This is the formula that I am using:

MIN(TIMESTAMPADD(SQL_TSI_MONTH,-6,MAX(Time.Date)))

It works in some cases but not others because some months have 30 days and others have 31 or 28. Any ideas how I can achieve this?

Thanks
This post has been answered by 577516 on Dec 21 2009
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details