Answers for "getting time and date formatted python"

1

print time in python

import time

t = time.localtime()
current_time = time.strftime("%H:%M:%S", t)
print(current_time)
Posted by: Guest on June-23-2020
2

python printing date

import datetime
print(datetime.datetime.now()) # --> (year, month, day, hour, minute, second, millisecond)
Posted by: Guest on October-03-2020

Code answers related to "getting time and date formatted python"

Python Answers by Framework

Browse Popular Code Answers by Language