Answers for "datetime now only time in hours and minutes in python"

3

python datetime now only hour and minute

from datetime import datetime
hour_and_minute = datetime.now().strftime("%H:%M")
# "14:09"
Posted by: Guest on March-19-2021

Code answers related to "datetime now only time in hours and minutes in python"

Python Answers by Framework

Browse Popular Code Answers by Language