Skip to content

Instantly share code, notes, and snippets.

@tlylt
Created May 19, 2020 13:10
Show Gist options
  • Save tlylt/3a30c6c85fd3df89c6078e3fe94e7df1 to your computer and use it in GitHub Desktop.
Save tlylt/3a30c6c85fd3df89c6078e3fe94e7df1 to your computer and use it in GitHub Desktop.
def make_datetime(string): # provided
string = string.split(' ')
date_str = string[0].split('/')
time_str = string[1].split(':')
date_int = [int(x) for x in date_str]
time_int = [int(x) for x in time_str]
return datetime.datetime(date_int[2], date_int[1], date_int[0], time_int[0], time_int[1])
@tlylt
Copy link
Author

tlylt commented May 19, 2020

time

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment