If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

Adding Days to a Date Field

Started by gatorfe, 02 Aug 2007 04:12:47 PM

Previous topic - Next topic

gatorfe

I have a report that shows me my orders and their schedule.  I just want to show the orders that have a scheduled date for the next 7 days so I know what needs to go out soon.  What should the formula syntax be for something like that?  Any suggestions would be greatly appreciated.

pvrraju

Hi

Create a HTML tag and copy the following code.

Please change your date prompt name ("txtDatefromDate" which is bold and red in colour)  in the code and check. I think it will work

<script type="text/javascript">

var date = new Date();
var newDate = new Date();
newDate.setDate(date.getDate()+7);
var day = newDate.getDate();
var month = newDate.getMonth();
var year= newDate.getYear();
var months = new Array('Jan','Feb','Mar','Apr','May',
'Jun','Jul','Aug','Sep','Oct','Nov','Dec');
document.forms[0].elements["txtDatefromDate"].value= months[month]+" "+day+", "+year;

</script>

bdybldr

Try this....

to_date({sysdate}) + 7
OR
_add_days({sysdate}, 7)