Reputation: 4624
I'm returning a datetime object that I wish to convert to int. For example:
print var, type(var) 5 day, 0:00:00 <type 'datetime.timedelta'>
How to return 5 as int?
5
Upvotes: 0
Views: 205
Reputation: 2255
In your example you should do var.days
var.days
Upvotes: 2