Hi yaya,
use StringTokenizer class for splitting date.
for example date: 12-04-2001. or 12-APR-01
then you have to write the code like this
StringTokenizer st = new StringTokenizer(date,"-");
if(st.hasMoreTokens())
{
year = st.nextToken();
month = st.nextToken();
day = st.nextToken();
}
test above code.
regards,
Haribabu.
At 02:57 PM 4/12/01 +0700, you wrote:
>How can i split a date from database?
>i want to split year, month, and day , and then put them into variables.
>Please help me!
>
>Thank's
>
>-yaya-
>
>===========================================================================
>To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
>For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
>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".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
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