This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Other Open Source Projects and the fly likes joda api calculating difference between two dates including milliseconds. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "joda api calculating difference between two dates including milliseconds." Watch "joda api calculating difference between two dates including milliseconds." New topic
Author

joda api calculating difference between two dates including milliseconds.

Rajubhai Kotwal
Ranch Hand

Joined: Nov 03, 2009
Posts: 47
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

Joined: Nov 03, 2009
Posts: 47
Experts ant suggestions/advice please?
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 37926
    
  22
Did you find this page?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: joda api calculating difference between two dates including milliseconds.
 
Similar Threads
dates between two dates
difference between two timestamps
Calculate date difference [Gregorian calender]
10000 milliseconds showing as 01:00:10.000 - why ?
oracle date between