I use BIRT for reports and i am a beginner BIRT user. In my report i must calculate the average of a column. (database is an oracle)
In my open script I have sth. like this:
sqlText = "select A, B, C, D, ((date1-date2) day to second) as differencedate from problem";
difference date column values are like this: 0 0:22:15 and in my fetch I have
if (!maximoDataSet.fetch())
return (false);
row["A"] = maximoDataSet.getString("A");
row["B"] = maximoDataSet.getDate("B");
....
row["differencedate"]=maximoDataSet.getString("differencedate");
return (true);
I tried to split the string and get the seconds from the differencedate and convert it to integer using plain JavaScript but I am getting an error like “split null” etc. So my question is how can i convert this column to integer in BIRT?
Try retrieving the date difference from the database as a number – like so: