I am having some trouble with developing an error check for the format of dates being inputted by the user.
I first use:
Testdate=input('What is the test date?(mm-dd-yyyy)','s')
I am able to obtain the user's input, I then would like to create a new function such as:
With this function, I would like to create an error checking code to ensure the user inputs the date in the format mm-dd-yyyy and also using reasonable numbers for month, day, and year(such as month: from 1 to 12, day: from 1 to 31, year: from 1900 to 2020). So, if the user doesn't input such values, an input message regarding their error will appear.