Source Code:
(back to article)
from datetime import datetime date_string = "2022-11-20" date_object = datetime.strptime(date_string, "%Y-%m-%d") day_of_week = date_object.weekday() print(day_of_week)
Result:
Report an issue