Answers for "date to week day"

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

Browse Popular Code Answers by Language