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.
コメント