top of page
Writer's pictureDavid Bolis

How To Use The Time and DateTime Module in Python

In This Tutorial we explore the easiest way to work with the Date and Time in Python.

There are two ways using two different modules currently available in Python, both are very useful however one of them offers more customisation to the programmer. Let's Begin!

import datetime
import time 

now = datetime.datetime.now()
print("Current Date and Time: ")
print(now.strftime("%Y-%m-%d %H:%M:%S"))

print("Current Date and Time Second Format: ")
print(time.asctime())
 

The Following is a detailed video explaining exactly how to accomplish the Above Code, feel free to browse the rest of my channel for more detailed tutorials including Python Tutorials and App Development Tutorials.



11 views0 comments

Recent Posts

See All

How to perform web scrapping via Python

Learn how to create your very own web scraping tool using #python with this comprehensive tutorial. Web scraping has become an essential sk

コメント


bottom of page