Get minutes, hours, and days from Python timedelta - A Python Short by Michael Kennedy

Get minutes, hours, and days from Python timedelta - A Python Short by Michael Kennedy

Michael Kennedy

2 года назад

6,025 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@martinb.8912
@martinb.8912 - 28.08.2023 18:34

Omg thanks for this info.
I am developing with python quite a while but did not know this.

Ответить
@raulrs50
@raulrs50 - 02.04.2023 23:24

Thanks, you saved me a lot of time! :)

Ответить
@df6148
@df6148 - 17.02.2023 06:45

Michael Kennedy is somebody that really cares about the Python community. The Bob Ross of python. 🎨 🏔️

Ответить
@arielspalter7425
@arielspalter7425 - 28.11.2022 06:45

How about months…each month has different number of days…it’s cool nonetheless 😊

Ответить
@ShoterOTP
@ShoterOTP - 27.11.2022 00:45

Helped me :)

Ответить
@abhishekprakash4793
@abhishekprakash4793 - 20.08.2022 19:59

Yes this is helpful

Ответить
@Geekgaucho
@Geekgaucho - 26.05.2022 08:53

Thanks so much for this! I had no idea this was a thing.

Ответить
@exchangevisual6252
@exchangevisual6252 - 10.05.2022 21:15

Solid!
Does anyone understand the syntax "dt:" on line eight?
I've been searching for the colon being used like this, but am not finding it.

Ответить
@rabindhamala9990
@rabindhamala9990 - 03.04.2022 19:07

definitely not obvious, I have been using timedelta but didn't know about this. Thanks.

Ответить
@aszxdwd
@aszxdwd - 25.02.2022 09:37

thank yooooooooooooooooooooooou soooooooooooo much Michael

Ответить
@10a3asd
@10a3asd - 13.02.2022 04:29

5 weeks ago I was looking for a more reliable way to do exactly this. For once in my life, I knew the answer before Michael.

Ответить
@topcivilian
@topcivilian - 12.02.2022 20:27

This is a new one for me, thanks!
A few seconds into the video, I immediately thought to
60 / 60 / 24
timedelta for the win

Ответить
@nortonowitz
@nortonowitz - 12.02.2022 17:24

Not obvious

Ответить
@TrollStdin
@TrollStdin - 12.02.2022 02:43

I was doing stuff like "days = dt.total_seconds() / 60 / 60 / 24", I wasn't aware of this until now, thanks and keep up the good work.

Ответить
@christophertyler1882
@christophertyler1882 - 12.02.2022 01:04

Thanks for the concise description on how to do this. I did know how to do this before this video, but only a few years ago. My current company I deal with time a lot and stumbled upon using timedelta when researching how to take care of time zones and quarterly data.

Ответить
@nielsbach-srensen5395
@nielsbach-srensen5395 - 11.02.2022 19:14

I knew, but only because I listened to your podcast! :)

Ответить
@ramakanaveen
@ramakanaveen - 11.02.2022 17:32

Nice one Michael. Very useful

Ответить
@abhijithudayakumar646
@abhijithudayakumar646 - 11.02.2022 17:11

Thank you for this!!. Now working with time would be so much efficient and time-saving.

Ответить