欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

python datetime操作

程序员文章站 2022-03-20 19:14:22
#datetime object转化为timestamp import datetime now = datetime.datetime.now() now_timestamp = time.mktime(now.timetuple()) ......
#datetime object转化为timestamp

import datetime


now = datetime.datetime.now()

now_timestamp = time.mktime(now.timetuple())