作者rexyeah (ccccccc)
看板Python
标题Re: [问题] 时间格式转换问题
时间Fri Oct 26 11:04:10 2018
推moment (
https://pypi.org/project/moment/)
import moment
d1 = moment.utc('Thu Oct 25 23:36:17 2018')
d2 = moment.utc('Thu Oct 25 23:31:17 2018')
print(d1 - d2)
==
output:
0:05:00
※ 引述《gigigigi (gigigigi)》之铭言:
: 我爬资料网站文章时间格式如下
: Thu Oct 25 23:36:17 2018
: 那我需要比对每篇文章相差几分钟
: 想请问一下有方法可以把上面时间格式转成分钟後我在相减
: 谢谢
--
※ 发信站: 批踢踢实业坊(ptt.cc), 来自: 61.221.35.72
※ 文章网址: https://webptt.com/cn.aspx?n=bbs/Python/M.1540523053.A.07D.html
1F:推 gigigigi: 赞 10/26 18:41
2F:推 asid52714: 推 10/26 21:18
3F:→ a08054491: 推 11/02 12:24
4F:推 corel: 推 11/02 20:14
5F:推 phoenixcx: 挖...这超简单 以前code一大堆... 11/20 13:44