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 Java in General and the fly likes How to set time 11:00 PM using Date or GregorianCalendar 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 » Java in General
Bookmark "How to set time 11:00 PM using Date or GregorianCalendar" Watch "How to set time 11:00 PM using Date or GregorianCalendar" New topic
Author

How to set time 11:00 PM using Date or GregorianCalendar

chaohua wang
Ranch Hand

Joined: Dec 22, 2002
Posts: 62
Hi folks,

I use Timer to set up TimerTask.
it will start at a speificed time, for example 11:00 PM everyday.
Could you tell me how to set time 11:00 PM using Date or GregorianCalendar.
Looks like no method set(hour, miunte,second) in these Class.
Thank you for your help!

Chaohua
Stefan Evans
Bartender

Joined: Jul 06, 2005
Posts: 1016
Calendar has a generic set method for any field you like.
ie

[ February 15, 2006: Message edited by: Stefan Evans ]
chaohua wang
Ranch Hand

Joined: Dec 22, 2002
Posts: 62
Thank you very much
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to set time 11:00 PM using Date or GregorianCalendar
 
Similar Threads
Date in java
Convert Local time to UTC and vice versa
Unable to fetch records by using 'where' clause for a date type field in sql
Adjusting GregorianCalendar to reflect a specific TimeZone
Simple Date conversion problem