Python时间戳转字符串

时间戳转字符串

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

字符串转时间戳

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

猜你喜欢

转载自blog.csdn.net/qq_44881930/article/details/131420640