Adding Months to date in Report

Hi all,
I am using DB2, I want to display few records based on adding current date + months.

say I want to display employee details who has travel dates from today
to number of months entered by the user.

The user is going to enter months as number like 5 so i need to add
five months from today’s date like 12/20/2004 and display all employee
whois plannin to travel till 12/20/2004.

So how can i add months to date in reporter. I can use a where condition
in the date objects with @ prompt in designer but is there any way out in reporter?


koushik7777 (BOB member since 2004-07-05)

Did you try using the Date Functions? You can create a variable which will be current date+ 5months and then you can base your calculations on that. Is that what you were trying to do?


Bharat :india: (BOB member since 2004-05-03)

Hi bharath,
Thanks for ur response. Yes I am trying to add current date + say 5 months and compare the date with some date object. I want to do this in reporter, like prompting the user for number of months and filtering the records. Is there any way in teh reporter to do it?


koushik7777 (BOB member since 2004-07-05)

I was asking you to do it in the reporter, it is possible to prompt the user to enter the month number or the month, and then add that User Response to the dataprovider. All of them are in the funtions options.


Bharat :india: (BOB member since 2004-05-03)

Hi Can you be more specific. please explain.
Thanks
Koushik


koushik7777 (BOB member since 2004-07-05)

You can use

RelativeDate(date; number of days)

You would have to use number of days instead of months though.

I am not sure if this is something that would be helpful for you or not.

kashif


Kashif Saeed :pakistan: (BOB member since 2004-06-02)