[Python-Dev] datetime.timedelta total_microseconds

INADA Naoki songofacandy at gmail.com
Thu Feb 28 03:51:03 EST 2019


>
> I *think* this is the "correct" way to do it:
>
> def timedelta_to_microseconds(td):
>     return td.microseconds + td.seconds * 1000 + td.days * 86400000
>
> (hardly tested)
>
> -CHB
>

1000?  milli? micro?


-- 
INADA Naoki  <songofacandy at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20190228/cbc0baaf/attachment.html>


More information about the Python-Dev mailing list