Hi

Try this, works ok for me.

 private int getMaxDay(String dt) {
     SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy");

     Date d = new Date();
     try {
        d = sdf.parse(dt);                    // parse a date from a string
     }
     catch(ParseException e) {
          System.out.println(e);
     }

     date.setTime(d);
     date.getTime();

     return date.getActualMaximum(Calendar.DATE);

 }

Scott

----- Original Message -----
From: "Kommana, Sridhar" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, August 24, 2000 7:50 AM
Subject: month --end of month -- year format


> Hi,
>   iam getting month(2) and year(2000) from the databse(oracle) for given
value.i need to display in the following format
> month/end of month/year(2/29/2000).can anybody suggest the function in
either oracle or java.
>
> Thanks in advance,
>
>
===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to