Answers for "how to get the day of the week from a date in python"

-1

how to get today weekday in python

today_day = date.today()
days = ["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","sunday"]
print("Today weekday is ",days[today_day.weekday()])
Posted by: Guest on October-03-2021
0

Python Day of the week

>>> from datetime import datetime
>>> datetime.today().strftime('%A')
'Wednesday'
Posted by: Guest on December-31-2021

Code answers related to "how to get the day of the week from a date in python"

Python Answers by Framework

Browse Popular Code Answers by Language