看板 Python 關於我們 聯絡資訊
推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://www.ptt.cc/bbs/Python/M.1540523053.A.07D.html
gigigigi: 讚 10/26 18:41
asid52714: 推 10/26 21:18
a08054491: 推 11/02 12:24
corel: 推 11/02 20:14
phoenixcx: 挖...這超簡單 以前code一大堆... 11/20 13:44