会员
周边
新闻
博问
闪存
赞助商
YouClaw
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
没有风的夜
博客园
首页
新随笔
联系
管理
订阅
随笔分类 -
python 时间
时间判断--自定义函数(1)
摘要:时间判断--XSY import time from datetime import datetime def DateJudge(s_time): #输入日期 # s_time = 1381419600 # 转为时间数组 timeArray = time.strptime(s_time, "%m%
阅读全文
posted @
2022-03-27 16:17
半个程序猿Cohen_Lee
阅读(101)
评论(0)
推荐(0)
python中时间、日期、时间戳的转换
摘要:python中时间、日期、时间戳的转换 1.简介 在编写代码时,往往涉及时间、日期、时间戳的相互转换。 2.示例 # 引入模块 import time, datetime 2.1 str类型的日期转换为时间戳 1 # 字符类型的时间 2 tss1 = '2013-10-10 23:40:00' 3
阅读全文
posted @
2021-04-29 14:13
半个程序猿Cohen_Lee
阅读(505)
评论(0)
推荐(0)
时间函数
摘要:###当地时间 import time time.strftime('%Y-%m-%d %H:%M:%S',time.localtime(time.time())) from datetime import datetime time = datetime.now().strftime("%H:%M
阅读全文
posted @
2021-04-15 16:26
半个程序猿Cohen_Lee
阅读(48)
评论(0)
推荐(0)
公告