I am writing a programe in which user is asked to enter his/her date of birth in DD/MM/YYYY format. What if he/she enters the date in other format? How can I write a syntax to check whether he/she enters the date in the given format? Can somebody give me an exact idea?
Thanks
You write the program which doesn't receive the date at a single stretch, that is first you prompt the user to enter DD, if he enters that then prompt him to enter MM and after that prompt him to enter YYYY.
Example :
Enter the Day =
if he enters the above value, then prompt him for
Enter the month =
and then
Enter the year =
Collect all the value in whichever format you want and thus the above problem will be solved.