hi Shiv
I also came through the situation.I also didn't find any methods in Java. So
I used a counter for this, try out this code and inform me whether it works
public int getCountDaysBetween(java.util.Calendar start_date,
java.util.Calendar end_date)
{
java.util.Calendar date1 = start_date;
java.util.Calendar date2 = end_date;
if (date1 == date2) return 0;
int counter=0;

java.util.Calendar new_date = null;

while(new_date!=date2)
{
if (date1.before(date2))
{
date1.add(Calendar.DATE,1);
new_date = date1;
counter++;
}
else if(date1.after(date2))
{
date1.add(Calendar.DATE,-1);
new_date = date1;
counter++;
}
}
return counter;

}


please reply

regards
Biju Sethumadhavan

------Original Message------
From: Manoj Kumar <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Sent: September 26, 2000 5:34:53 AM GMT
Subject: Re: Date!


see the methods available in calender class..there is one method which does
this job.



> -----Original Message-----
> From: Deo Prakash [SMTP:[EMAIL PROTECTED]]
> Sent: Tuesday, September 26, 2000 11:00 PM
> To:   [EMAIL PROTECTED]
> Subject:      Re: Date!
>
> use GregorianCalender........
> ----- Original Message -----
> From: Shivashankar Krishnan <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, September 26, 2000 10:14 AM
> Subject: Date!
>
>
> > can anyone help me in getting the difference between
> > two date values.  The two values are passed as
> > parameters from an html page and fed to the servlets.
> > The servlet computes the differece.  Can anyone help
> > me out in this.  I really don't know a method which
> > finds difference in dates in Java
> >
> > regds
> > Shivashankar
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Send instant messages & get email alerts with Yahoo! Messenger.
> > http://im.yahoo.com/
> >
> >
> __________________________________________________________________________
> _
> > 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

___________________________________________________________________________
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


______________________________________________
FREE Personalized Email at Mail.com
Sign up at http://www.mail.com/?sr=signup

___________________________________________________________________________
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