Answers for "python get system datetime"

2

how to get the system time in python

from datetime import datetime

now = datetime.now()

current_time = now.strftime("%H:%M:%S")
print("Current Time =", current_time)
Posted by: Guest on July-25-2021

Python Answers by Framework

Browse Popular Code Answers by Language