Discussions
Categories
Choose a Product
THRUST SERVICES
CORE APPS
CE PRODUCTS
...
Quick Links
POPULAR
HELPFUL TIPS
Groups
My Links
FOR SIGNED IN MEMBERS:
Back to website
Home
Designing Analytics Reports
date range
Migrateduser
hey i am new to Birt .I want to display record including from and to date range.I am using Mysql database .I have used the following format.But it is not working Can u help on this?
I am giving yyyy-MM-dd as input string .if(params["From"].value!=null && params["To"].value!=null)
{
from1 = new Packages.java.text.SimpleDateFormat("yyyy-MM-dd");
fromdate=new Packages.java.util.Date();
fromdate = from1.parse(params["From"].value);
from2 = new Packages.java.text.SimpleDateFormat("yyyy-MM-dd");
from2.format(fromdate);
to1 = new Packages.java.text.SimpleDateFormat("yyyy-MM-dd");
todate=new Packages.java.util.Date();
todate = to1.parse(params["From"].value);
to2 = new Packages.java.text.SimpleDateFormat("yyyy-MM-dd");
to2.format(todate);
this.queryText = this.queryText + " and DATE(created_on) >= '"+from2.format(fromdate)+"' and DATE(created_on) <= '"+to2.format(todate)+"'";
}
I have attached my file
Find more posts tagged with
Comments
There are no comments yet