Rich,
Yes you are right. It would be better if I stop my execution soon after I get ParseException, and show a customized message saying invalid date. But in my case, the requirement is, I need to be specific as to which field is entered wrong. and display where the user entered wrong value. So...
Thanks for the reply Rich. You are right when i am entering a wrong date, for example 15/23/2005, it is converting that to 3/23/2006, and giving the day and month based on the new calculataions. But what i want in my code is if there is a wrong day or month entered, i wanted to display a...
Hi Everyone,
I have a question to ask regarding the SimpleDateFormat class.
In my code i am having a date string and i am converting it to a date. and validating if the month entered is greater than max month and if day is greater than max day. If so i want to throw the error.
Here is my piece...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.