Home
Analytics
Cummulative concept
priya
I want toRetrieve the 3 Months Old Data if i Selected a Particular Date.
can anyone help me in this concept
Find more posts tagged with
Comments
mwilliams
Hi priya,
Can you explain more of what you're looking for? Are you wanting to specify a range of dates to grab from the database? Or do you want 3 months before of after the specified date? Or something completely different?
priya
Hi
I am looking for 3 months old data before the specified date from the database.....
mwilliams
Priya,<br />
<br />
You should be able to use the filter idea from this other post you had to handle this as well.<br />
<br />
<a class='bbc_url' href='
http://www.birt-exchange.com/forum/designing-birt-reports/12016-cumulative.html#post37182'>http://www.birt-exchange.com/forum/designing-birt-reports/12016-cumulative.html#post37182</a>
;
birtq
Hi
Using query it can be done this way:
enteredDate = params["Date"];
temparray = enteredDate.split('-');
enteredMonth = temparray[0];
enteredDay = temparray[1];
enteredYear = temparray[2];
threemonth_old=enteredMonth-03;
threemonth_oldday=01
olddate=enteredYear+ "-" + threemonth_old + "-" + threemonth_oldday;
this.queryText = this.queryText +"where database_Date between" +"'"+olddate+"'" +"and "+ "'" + enteredDate + "'";
regards,
birtq