get next date by next day

Sun Jun 20, 2010 8:07 am

Following code allow you to get the next or the previous date by a number of days :

Code:


 
public Date seekDateByDay(Date date,int daySeek){
    
Object[] params = { date,daySeek };
 
    if(
date == null){
        return 
null;
    }
    
Calendar seekedDate Calendar.getInstance();
    
seekedDate.setTime(date);        
    
seekedDate.set(Calendar.DAY_OF_MONTHseekedDate.get(Calendar.DAY_OF_MONTH)+daySeek);
 
    return 
seekedDate.getTime();
    
    }
 




  Related Posts  to : get next date by next day
 Want start and end date of a month from current date     -  
 Formatting a Date with date()     -  
 String to sql.Date     -  
 date validation in asp     -  
 Date in Java     -  
 How To Increment Date In JSP?     -  
 make class of date     -  
 Convert String to Date     -  
 date formatting in Java     -  
 Google indexing DATE     -  

Topic Tags

Java Time