Jain,

    Here is some example code that may help you using the SimpleDateFormat.

 private void calculateEndDate(java.util.Date todaysDate, int
daysfromtodaysdate){

  SimpleDateFormat formatterEndDate;
  calendar = Calendar.getInstance();
  formatterEndDate = new SimpleDateFormat("MM/dd/yy");
  formatterEndDate.setTimeZone(java.util.TimeZone.getDefault());  // bug fix so
not PST & is CST

  if(amtForDayMoYr.equals("5")){
   calendar.add(Calendar.DAY_OF_YEAR, 10 + daysfromtodaysdate);
   todaysDate = calendar.getTime();
   endDate = formatterEndDate.format(todaysDate);
  }


Good luck,

Tom Kochanowicz

Geetanjali Jain wrote:

> Hi all !
>
> I'm working with dates. I need to increment a date day by day. E.g.
> 1998-09-09 to 1998-09-10, and so on.
> DATE object doesn't support any method to meet the purpose.
> Can anyone suggest any way of getting the desired result.
>
> Thanks
> Geetanjali
>
> ___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to