How do i convert a date string from user input to date.today() python -



How do i convert a date string from user input to date.today() python -

python newbie, need convert string user input in format dd/mm/yyyy , check see if in future?, need re order format of input comparing , convert date object.

thanks

not sure you're wanting do, take in dd/mm/yyyy , tell if it's older now.

import time # input date = input("enter date: ") # convert timestamp date_timestamp = time.mktime(time.strptime(date, "%d/%m/%y")) # check if in future if(date_timestamp > time.time()): print("it's in future,") else: print("it's not in future,")

python

Comments

Popular posts from this blog

maven fortify plugin : Unable to load build session with ID XXXXX .. See log file for more details -

c# - Primavera WebServices does not return any data -

android - Display emoji panel with genymotion - keyboard/touch input? -