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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adding months

Status
Not open for further replies.

Iain75

Programmer
Oct 8, 2003
26
GB
I have a date to which I want to add a pre-formulated number of months.

The date we're working with is defined in the universe as datestamp converted from a timestamp.

We have exhausted all the B.O. pre-defined functions and are stuck!

(for example - 01/09/2006 + 5 months to give 01/02/2007)
 
sorry - i should add that we're using Business Objects 5.1.7 on DB2 version 8.2
 
Have you tried the "RelativeDate" function

If that doesn't work for you (may not as it adds days rather than months), you will need to convert the date to a string, manippulate it using Left & SubStr to add the 5 months to the moth part, including logic for end of year, then convert back to date

Rgds, Geoff

We could learn a lot from crayons. Some are sharp, some are pretty and some are dull. Some have weird names and all are different colours but they all live in the same box.

Please read FAQ222-2244 before you ask a question
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top