"Loris Bennett" <loris.benn...@fu-berlin.de> writes:

> Hi,
>
> With Python 3.9.2 I get
>
>   $ import datetime
>   $ s = "1-00:01:01"
>   $ t = datetime.datetime.strptime(s, "%d-%H:%M:%S")
>   $ d = datetime.timedelta(days=t.day, hours=t.hour, minutes=t.minute, 
> seconds=t.second)
>   $ d.days
>   1
>   $ d.seconds
>   61
>   $ d.minutes
>   AttributeError: 'datetime.timedelta' object has no attribute 'minutes'
>
> Is there a particular reason why there are no attributes 'minutes' and
> 'hours and the attribute 'seconds' encompasses is the entire fractional
> day?

That should read:

  Is there a particular reason why there are no attributes 'minutes' and
  'hours' and the attribute 'seconds' encompasses the entire fractional
  day?

> Cheers,
>
> Loris
-- 
Dr. Loris Bennett (Herr/Mr)
ZEDAT, Freie Universität Berlin         Email loris.benn...@fu-berlin.de
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to