import datetime time_str = input("enter time in this format yyyy-mm-dd") time=datetime.datetime.strptime(time_str, "%Y-%m-%d")
date = input("Enter date: >> ") //input >> 22/4/2022 print(date) //output >> 22/4/2022