6 lines
144 B
Python
6 lines
144 B
Python
import datetime
|
|
|
|
def get_datetime(time_str):
|
|
time_format = "%Y:%m:%d %H:%M:%S"
|
|
return datetime.datetime.strptime(time_str, time_format)
|