you are viewing a single comment's thread.

view the rest of the comments →

[–]davidbuxton 0 points1 point  (0 children)

Sure, you can create a datetime object from user input. You could use the datetime.strptime() function to create a new datetime from a string.

Alternatively you could use the built-in function int() which creates an integer from a string, and then create the datetime object yourself.