I am trying to convert my weekday as a string to an int in python here is what I have
from datetime import date, datetime, time, time delta
from pytz import timezone
now = datetime.now(timezone('UTC'))
dt_tz = now.astimezone(timezone('US/Eastern'))
dt = dt_tz.replace(tzinfo=None)
weekday = 'Friday'
weekday_as_int = dt.strptime(weekday, "%A")
But i get this error
ValueError: time data 'Friday' does not match format '%A'
Why won't it change Friday
to a int?