I usually use Gregorian Calendar to do this. Gregorian calendar has a method in there ( I believe ) that says something like getField(). And then inside of that you pass in the field constant. something like myGregorianCal.getField(GregorianCalendar.MINUTES); something like that. Of course you could then do myGregorianCal.getField(GregorianCalendar.HOURS). To create the instance myGregorianCalendar, you might use the new GregorianCalendar(long) and pass in the milliseconds of the object. Typically that is the bridge between many of these time related objects. Most of them convert to down to milliseconds.
Hope that helps.
By failing to prepare, you are preparing to fail.<br />Benjamin Franklin (1706 - 1790)
Joined: Nov 08, 2006
Hi..thanks for replying..
is there any clause that I can make use of to compare only Hour and minute that I can make use of..as a 'between' or '<' and '>' in the ejb ql?
as I have to fetch all the transcations that has occured between 0 to 59 second of that minute?