Weekday of Date

import datetime
datetime.datetime.strptime("20230101", "%Y%m%d").weekday()