File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Compare Hours and Minute in java

 
pankaj semwal
Ranch Hand
Posts: 303
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi List,
How can i compare the time in java as my time format is Hours:Minute.
example: i am getting time like this : 1645 and 1500 so how can i compare this time.

Please tell me.

Thanks
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What do you mean by compare? Are you looking for which is earlier/later? If so, the Calendar class has before and after methods. Or do you mean find out how much the time difference is? In which case, these two times are just ultimately a long representing a number of milliseconds. You could subtract one from the other.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic