Hi Jeroen, I got it now. Thank you so much! Cheers, Hieu Phan.
> -----Original Message-----
> From: Jeroen Brattinga [mailto:[EMAIL PROTECTED]
> Sent: Thursday, December 21, 2006 6:38 PM
> To: [email protected]
> Subject: Re: [mina] Java Time validation
>
> You could do a check afterwards on the parsed Date (using the .format
> method) to see if the resulting date-string is equal to the
> original one.
>
> --
> Jeroen Brattinga
>
>
> 2006/12/21, Hieu Phan Thanh <[EMAIL PROTECTED]>:
> >
> > Hello all,
> >
> > Firstly, I am so sorry for the question not related to MINA
> framework.
> >
> > How could I check whether the input String is valid or
> invalid date time
> > format?
> > The application supports user input: yyyyMMddHHmmss
> > And I use the SimpleDateFormat to parse the inputted String.
> > If 20061112120000 => expected result: 2006/11/12 12:00:00
> > If 20061312120000 => expected result: INVALID (however the
> > SimpleDateFormat parses correctly: 2007/01/12 12:00:00)
> >
> > I think that it's very stupid if I check each part (yyyy, MM, dd...)
> > Is there any one know the better way to check this case?
> > Any help is highly appreciate.
> >
> > Thanks & best regards,
> > Hieu Phan.
> >
> >
>