Answers for "what is date time module in python"

5

python datetime module

import datetime as d
time = d.datetime.now()
time = time.strftime("%Y-%m-%d  %H:%M:%S")
           #year-#month-#date  #hour:#minure:#second
print(time)
Posted by: Guest on May-06-2021

Code answers related to "what is date time module in python"

Python Answers by Framework

Browse Popular Code Answers by Language