Thanks, Guys!
I just finished it!!! Here's the code (very sloppy, but it works):
Integer year = new Integer ((new
CSpString(date.toString().substring(0,4))).intValue());
Integer month = new Integer ((new
CSpString(date.toString().substring(5,6))).intValue());
Integer day = new Integer ((new
CSpString(date.toString().substring(7,8))).intValue());
Rimma Stavitskaya
Lehman Brothers
Internet Services Group
(201)524-4356
> -----Original Message-----
> From: Curt Springer [SMTP:[EMAIL PROTECTED]]
> Sent: Friday, August 06, 1999 1:19 PM
> To: O'Day
> Cc: [EMAIL PROTECTED]
> Subject: Re: [ND] very simple
>
>
> shouldn't it be:
>
> >String date = new String("19990802");
> >String year = date.substring(0,4);
> >String month = date.substring(4,6);
> >String day = date.substring(6);
>
>
> -- Curt
>
> At 09:33 AM 8/6/99 -0700, O'Day wrote:
>
> >use this method to create new Strings appropriately.
> >
> >public String substring(int beginIndex,
> > int endIndex)
> >
> >Returns a new string that is a substring of this string. The substring
> >begins at the specified beginIndex and extends to the character at index
>
> >endIndex - 1.
> >
> >ex)
> >
> >String date = new String("19990802");
> >String year = date.substring(0,3);
> >String month = date.substring(4,5);
> >String day = date.substring(6,7);
> >
> >"Rimma" <[EMAIL PROTECTED]> wrote:
> > >
> > >Hello my forum pals!
> > >Could anybody suggest me an easy way to parse a string Date in format
> > "19990802"?
> > >Basically, what I need to do is take a string "1999", "08" and "02"
> > separately and then
> > >manipulate them a bit. I just don't know the exact code for parsing
> the
> > string.
> > >Thanks,
> > >Rimma
> >
> >_________________________________________________________________________
> >
> >For help in using, subscribing, and unsubscribing to the discussion
> >forums, please go to: http://www.netdynamics.com/support/visitdevfor.html
> >
> >For dire need help, email: [EMAIL PROTECTED]
>
> _________________________________________________________________________
>
> For help in using, subscribing, and unsubscribing to the discussion
> forums, please go to: http://www.netdynamics.com/support/visitdevfor.html
>
> For dire need help, email: [EMAIL PROTECTED]
_________________________________________________________________________
For help in using, subscribing, and unsubscribing to the discussion
forums, please go to: http://www.netdynamics.com/support/visitdevfor.html
For dire need help, email: [EMAIL PROTECTED]