首页 > 编程语言 > 详细

Python笔记27----时间解析

时间:2018-10-17 15:27:53      阅读:167      评论:0      收藏:0      [点我收藏+]

1、将时间字符串解析成真正的时间 time.strptime

http://www.runoob.com/python/att-time-strptime.html

技术分享图片

代码:

 
import time
 
struct_time = time.strptime("30 Nov 00", "%d %b %y")
print("返回的元组: %s " % (struct_time,))
print(type(struct_time))
print("返回的元组: %s " % struct_time.tm_year)

 

Python笔记27----时间解析

原文:https://www.cnblogs.com/Lee-yl/p/9804362.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!