datetime Module (How to Work with Date & Time in Python) #30

preview_player
Показать описание
Python has a module named datetime to work with dates and times.

Even though date and time may seem simple and straightforward in our daily use cases, they can be challenging to implement in our code because we have to keep a record of things such as different date and time formats, different time zones and so on. Fortunately, Python provides a built in datetime module to simplify this task.

In this video, we will use the datetime module to manipulate date and time in Python with the help of examples.

~

Watch our videos and revise them with our Python App!

Timestamps:
0:00 Intro
0:24 Get Current Date
8:18 Getting Current Date and Time
11:12 Python strftime() method
14:25 Python strptime() method

Find Programiz elsewhere:
-------------------------------------------------

datetime Module (How to Work with Date & Time in Python) #30

#programiz #python #learnprogramming #pythonforbeginners #dateandtimeinpython
Рекомендации по теме
Комментарии
Автор

🔥Finding it Damn Hard to Understand Python?
Learn to code—the right way—with interactive lessons, quizzes & challenges. Build a strong programming base; it's IMPORTANT!

programizstudios
Автор

Dude, I'm so happy and proud of you. You created a whole course alongside wonderful videos; you nailed it!

cesararturocastanonacuna
Автор

Love how detailed Python tutorials are

abakella
Автор

wonderful presentation and clear voice

ferrerolounge
Автор

I'm grateful and thankful for usual support and concern, u make me to be proud of myself.
Thank you so much .

abk
Автор

Very very very well presented video. I particularly appreciate the chronology you followed which made it feasible to understand, Thumbs Up Buddy!

jacknapster
Автор

THANK YOU BRO I WAS REALLY CONFUSED HOW TO USE IT THANKS ONCE AGAIN BRO 😀😀😀🤗

yashdixit
Автор

Thank you brother, I speak from Brazil!

wesleydcm
Автор

Thank you, I am new to python, but I have programed in other languages for a long time. The date time part of python in "normal" descriptions seems always to leave "holes" in the description which leaves me guessing; I can do that but it is annoying. Your presentation here is the most clean and precise that I have seen, now I have no holes and I understand. Thank you.

MichaelGerety
Автор

competitive programing with date and time is easy now

thundercodes
Автор

Thank you for this tutorial, @Programiz

medalcoder
Автор

This helped me so much! Thank you!!😀 You have yourself a new subsriber!

pranavgs
Автор

very weel structured lectures, simple and clear!

zhengxijiang
Автор

Thanks for this nice tutorial i was looking for a tutorial like this for datetime module
your tutorials are very well
thanks a lot
I subscribed to ur channel

iwebbio
Автор

This video was recorded on my birthday

joshuarexmondnunoootoo
Автор

Well I probably should have finished watching the video before I started making my own program. Because i just made figuring out how many days until new year much more complicated than I had to.

import datetime as dt
date = (dt.date.today())
year = date.year
month = date.month
day = date.day
countdown = 0
while month <= 12:
if month % 2 == 0:
if month == 2:
if year % 4 == 0:
countdown += 29
else:
countdown += 28
elif month <= 7:
countdown += 31
else:
countdown += 30
else:
if month <= 7:
countdown += 30
else:
countdown += 31
month += 1
countdown -= day
print(countdown, "days until", year+1)

fishersofmen_YT
Автор

great lecture but what code editor did you use, I use visual studio code and it's not giving me the same interface as yours

blessingogah
Автор

I have seen many videos to understand this concept but i can't. This is the best video. Thank you

mukeshkumar-beoo
Автор

its very detailed information. thanks alot. Can you please help to share how can i use filtered time. like i want to start entry time of my staff at a particular time and end it at a particular time.

sunilmalhotra
Автор

“I have always imagined that Paradise will be a kind of library.”

BilluComedian