Answer the question
In order to leave comments, you need to log in
Why doesn't the format fit?
try:
obj = datetime.strptime('11.10.2021\xa0пн', '%d.%m.%Y\xa0%a')
print(obj)
print(obj.strftime("Date:%d Month:%m Year:%Y")) # strftime to format datetime obj
except ValueError as ex:
print("ValueError: ", ex)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question