0

I would like to find solution for converting date to day of the week (using Python). The day's format for example:

'28 Jan 2020' should return Tuesday.

I was looking for solution here, but couldn't find for this specific format. Does anybody can help with solution?

Frendom
  • 508
  • 6
  • 24

1 Answers1

1

You could use datetime.strptime

 >>> from datetime import datetime
 >>> datetime.strptime("28 Jan 2020","%d %b %Y").strftime("%A")
'Tuesday'
abc
  • 11,579
  • 2
  • 26
  • 51