File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Comparision of Time

 
jaya repaka
Greenhorn
Posts: 18
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
I have one date field.I am getting the time(hh:mm a) as
example: 10.30 PM I wanted to compare this time with hard coded value(8.30PM)
Is there way to compare two time(if(this time> hardcoded time)- 10.30PM > 8.30PM)..If there is a way please le me know..


Thanks in advance

Regards
lakshmi
 
Stefan Wagner
Ranch Hand
Posts: 1923
Linux Postgres Database Scala
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I read this:

as
and throw a QuestionNotUnderstoodException.
 
Ulf Dittmer
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you have the dates as java.util.Date or java.util.Calendar objects, you can use the before() and after() methods.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic