【发布时间】:2012-08-22 18:18:59
【问题描述】:
有没有办法将datetime 转换为int,表示自例如2012 年1 月以来的分钟数,以便可以修改int,将其写入数据库,进行比较等等?
编辑:
我运行它的服务器使用 Python 2.6.6
【问题讨论】:
-
请尝试
datetime.datetime.strptime和timestamp()'datetime' 中的函数。
标签: python datetime int python-2.6