Answers for "How do I get the day of week given a date?"

0

How do I get the day of week given a date?

>>> import datetime
>>> datetime.datetime.today()
datetime.datetime(2012, 3, 23, 23, 24, 55, 173504)
>>> datetime.datetime.today().weekday()
4
Posted by: Guest on July-21-2021

Code answers related to "How do I get the day of week given a date?"

Browse Popular Code Answers by Language