Answers for "print python with system time"

1

python print time

import datetime
now = datetime.datetime.now()
print (now.strftime("%Y-%m-%d %H:%M:%S"))
# key: https://strftime.org/
Posted by: Guest on March-17-2020
0

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