Python timestamp to string

Timestamp to string

datetime.datetime.strftime(timestamp, "%Y-%m-%d %H-%M-%S")

Convert string to timestamp

time.mktime(time.strptime(str1, '%Y-%m-%d %H:%M:%S'))

Guess you like

Origin blog.csdn.net/qq_44881930/article/details/131420640