Thread: Inbetween Dates
View Single Post
  #2 (permalink)  
Old 12-12-2007, 11:40 AM
gulapala gulapala is offline
Member
 
Join Date: Dec 2007
Posts: 11
gulapala is on a distinguished road
Hi,

In Jdk1.5, you have the two methods after(Date when) and before(Date when) in the Date class, which return the boolean value. You can add the code as below(pseudo code is given):

Code:
Date d = new Date() // d is the Date that needs to be checked boolean check = false; if (d.after(startdate) && d.before (enddate)) check = true; if (check == true) //your code should be here.
__________________
Thanks & Regards, G.Rajasekhar

Last edited by JavaBean : 12-12-2007 at 12:13 PM. Reason: To highlight the code. - Use [ code ] not <code>
Reply With Quote