In my small script I wanted to give script task time. In small time like under 1 min, I give min as -999999999.
But there is no problem in others. Seconds and microseconds can be got and they are int type, though min <class 'datetime.timedelta'>
My related code bunch is:
from datetime import datetime,timedelta
now = datetime.now()
# some code here
then = datetime.now()
delta= then-now
print(delta.seconds) # 10
print(delta.microseconds) # 432214
print(delta.min) # '-999999999 days, 0:00:00'
In the console I give:
datetime.timedelta(days=-999999999)
Where am I doing wrong?