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.

Reply via email to