摘要: import datetime t1 = datetime.datetime.strptime("2017-9-06 10:30:00", "%Y-%m-%d %H:%M:%S")t2 = datetime.datetime.strptime("2017-9-06 12:30:00", "%Y-%m 阅读全文
posted @ 2020-11-05 09:56 忧伤恋上了快乐 阅读(1032) 评论(0) 推荐(0) 编辑
摘要: 一、time的常用方法: import time,datetime# 时间有三种展现方式:时间戳,时间元组,格式化的时间print(time.time())#当前时间戳print(int(time.time()))print(time.strftime('%Y-%m-%d %H:%M:%S'))#格 阅读全文
posted @ 2020-11-05 09:19 忧伤恋上了快乐 阅读(238) 评论(0) 推荐(0) 编辑