【发布时间】:2012-10-25 14:03:19
【问题描述】:
我有一个浮点值,我需要除以天数,计算如下:
import timedelta
import datetime
days_cur_cycle=abs(start_date.date()-today_date.date())
//start_date and today_date are datetime objects
x=3.09
y=x/days_cur_cycle`
这里出现以下错误
**TypeError: unsupported operand type(s) for /: 'float' and 'datetime.timedelta'**
请大家帮我计算一下
【问题讨论】:
标签: python python-2.7