Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

joda api calculating difference between two dates including milliseconds.

 
Rajubhai Kotwal
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Experts,

I am looking to calculate difference between two dates including milliseconds. I have gone through JODA API. I have a report as an output in ireport. I am executing it witihn a java now. I want to display difference between two dates including milliseconds. Initially, I changed the query to "TIME_FORMAT(TIMEDIFF(process1.end_datetime, process1.start_datetime),'%H:%i:%S%f') as exec_time". Later I tried to import joda-time-1.6.1.jar in the ireport itself. It didn't work. In a simple date difference program, how could I achieve this? Once I find the way to calculate difference including milliseconds, I would import same technique in the report later. Has anyone worked on this earlier? I would appreciate your suggestions/ideas. Thank you in advance. Following is my current output. On the RunTime i want to include milliseconds as well.

ID StepName StartTime EndTime RunTime Status
3 Process1 2010-08-09 02:08:00 AM 2010-08-09 02:08:01 AM 00:00:01 Success
4 Process2 2010-08-09 02:08:01 AM 2010-08-09 02:15:00 AM 00:06:59 Success


Best regards.
 
Rajubhai Kotwal
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Experts ant suggestions/advice please?
 
Campbell Ritchie
Sheriff
Pie
Posts: 49789
69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you find this page?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic