python 带小数点时间格式化
#获取带小数点的时间
>>> import datetime #当前时间加3天 >>> t1 = datetime.datetime.now() + datetime.timedelta(days=3) >>> print(t1) 2017-04-03 10:42:50.714910
将带小数点的时间字符串解析
>>> time.strptime('2017-06-07 21:39:34.352885','%Y-%m-%d %H:%M:%S.%f') time.struct_time(tm_year=2017, tm_mon=6, tm_mday=7, tm_hour=21, tm_min=39, tm_sec=34, tm_wday=2, tm_yday=158, tm_isdst=-1)