Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using 'number of months' in a formula

Status
Not open for further replies.

smooveb

IS-IT--Management
Jul 20, 2001
161
US
Hi everyone,

I'm using BO 6.5 SP2. I have two columns - one is a production date, another is the number of months before a product expires. How can I build a formula that uses both these columns to return the actual date the product expires?

Thanks much in advance!

Barrett
 
You will need to turn the number of months into a number of days. This will require some big formula to get it right since BO doesn't know how many days are in each month.

Then you can use the RelativeDate function in BO to determine the expiration date.

Somewhere in the back of my mind, I keep seeing an AddMonths function. I don't recall if it's in Oracle, SQL Server or a BO report function.

Steve Krandel
Intuit
 
SQL server has a T-sql function 'dateadd' that will allow calculation with many datetypes:

DATEADD (datepart , number, date )

In case the date does not exist in the returned month (like adding one month to 31 august), then the function will return the last day of that month (--> 30 sep)

Ties Blom

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top