Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
String to date
Rajesh kmr
i need to find the previous date.for that
i am trying to get the value of test in another data field,based on the data comparison,but when i am adding -1 to the param date its getting converted to string and so my if condition get false,
so i am getting test value as null ,
can you please suggest me any way so that i can get the test value as "coming inside" i.e. if condition should be true based on date comparison.
or any other method in birt report designer to get the previous date,and next date and comaparison should work...see the below code...
var demandArray=new Array()
var timeindex
var inputDate
var previousDate=new Date();
previousDate=BirtDateTime.addDay(params["demandDate"].value ,-1);
timeindex=1+((params["time"].value)/50);
var test1="coming not inside";
if(params["date"].value==previousDate.getDate())
{
var test="coming inside";
if(params["time"].value>2400)
{
timeindex=1+((params["time"].value - 2400)/50)
if(params["value"].value>0)
{
demandArray[timeindex]=params["value"].value;
}
}
}
else
{
}
Thanks
Rajesh Kumar
Find more posts tagged with
Comments
johnw
Check to make sure that your parameter demandDate is set to type DateTime. You could also use a Java DateFormat object to force it to a date type if this persists.
Rajesh kmr
thanks ,
but i did it with the help of sql query