Answers for "get current hour minutes pyhton"

C#
9

python get current hour

import datetime
now = datetime.datetime.now()
print(now.year, now.month, now.day, now.hour, now.minute, now.second)
Posted by: Guest on May-12-2020
0

print current time hours and minutes in python

import datetime
currentime = datetime.datetime.now()
time = currentime.strftime('%H:%M')
print(time)
Posted by: Guest on December-08-2021

C# Answers by Framework

Browse Popular Code Answers by Language