mxc Posted November 29, 2006 Share Posted November 29, 2006 Hi all, In my report I need to show the average number of days beween the time the issue was logged and the time it was resolved. From the database I get two java.util.Date fields. I have created a variable $avg_days. I have tried something like this with the average calculation but since setTime returns void it doesn't work.Code:(new java.util.Calendar().setTime($F{date_accepted}).getTimeinMillis() - new java.util.Calendar().setTime($F{date_logged}).getTimeinMillis())/86400 Does anyone else have an idea how to do this? Link to comment Share on other sites More sharing options...
babarincairo Posted December 10, 2006 Share Posted December 10, 2006 do you find a solution ? thanks Link to comment Share on other sites More sharing options...
joeycn Posted December 11, 2006 Share Posted December 11, 2006 try this:($F{date_accepted}).getTime()instead of new java.util.Calendar().setTime($F{date_accepted}).getTimeinMillis();) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now