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

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

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

代码:

 
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)

 

相关文章:

  • 2022-12-23
  • 2021-10-11
  • 2022-01-28
  • 2021-05-27
  • 2021-06-25
  • 2021-04-18
  • 2021-06-03
  • 2022-12-23
猜你喜欢
  • 2021-08-12
  • 2022-12-23
  • 2021-08-18
  • 2021-11-30
  • 2021-09-30
  • 2022-12-23
  • 2021-05-15
相关资源
相似解决方案