I wanted to check if user has entered the input in particular order or not. Basically i wanted user to input date in format like this
%d/%m/%y %H:%M
Is there any way i can compare string input with the above format in python?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
This will raise ValueError if the string doesn’t match:
By the way, please don’t bring back two-digit years–use %Y if at all possible.