Forums Register Login

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

+Pie Number of slices to send: Send
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
+Pie Number of slices to send: Send
Calendar has a generic set method for any field you like.
ie

[ February 15, 2006: Message edited by: Stefan Evans ]
+Pie Number of slices to send: Send
Thank you very much
And then the flying monkeys attacked. My only defense was this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 6630 times.
Similar Threads
Adjusting GregorianCalendar to reflect a specific TimeZone
Simple Date conversion problem
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
More...

All times above are in ranch (not your local) time.
The current ranch time is
Apr 16, 2024 05:29:33.