wood burning stoves*
The moose likes Beginning Java and the fly likes Dates 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 » Java » Beginning Java
Bookmark "Dates" Watch "Dates" New topic
Author

Dates

Giomar Guevara
Ranch Hand

Joined: Oct 18, 2006
Posts: 51
I want to get the difference between 2 dates and get it in hours....

How can I do that?
David Buzatto
Greenhorn

Joined: Jul 16, 2006
Posts: 9
Take a look in the Joda Time API.

Bye!


"Any fool can write code that a computer can understand. Good programmers write code that humans can understand." (Fowler)
Mark Vedder
Ranch Hand

Joined: Dec 17, 2003
Posts: 624

Take a look at these JavaWorld articles: Calculating Java dates and Working in Java time : Learn the basics of calculating elapsed time in Java - they do a nice job of explaining Date math in Java.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Dates
 
Similar Threads
I have a doubt in oracle!
display only 2 rows from a recordset size of 10
comparing dates
How get Dates in a particular week Of year
How to get the difference between 2 dates ?