0

I am receiving a datetime with Pyhton 3. of this format:

23. Mär 2018 08:00:02

The month is in German notation and stands for March. While trying to convert it to a datetime object I do get an error. Months like Feb work which are of same naming as in eng.

dt.datetime.strptime(result['postedDateTime'], '%d. %b %Y %H:%M:%S').strftime("%Y/%m/%d %H:%M")

Is there a way to configure strptime for german notation?

merlin
  • 2,717
  • 3
  • 29
  • 59

0 Answers0