dcsimg
compare 2 times or dates
2 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Java_THuG
Posted On:   Saturday, May 1, 2004 02:06 AM


How can i compare between two dates or times, that a program works untill this date or something like this , using java APIs ... ?

thanks in advance ...

Re: compare 2 times or dates

Posted By:   David_Thornton  
Posted On:   Sunday, May 2, 2004 04:17 PM

Use a java.util.Timer and a java.util.TimerTask to schedule a task to run every n seconds/minutes/hours (depending on the required granularity) to compare the current date/time with the required termination date/time.

Re: compare 2 times or dates

Posted By:   tech_tech  
Posted On:   Saturday, May 1, 2004 08:48 AM

use the calendar object and it has dateAfter function
About | Sitemap | Contact