티스토리 뷰

728x90
>>> from dateutil import parser
>>> parser.parse('January 11, 2010').strftime("%a")
'Mon'
>>> parser.parse('January 11, 2010').strftime("%A")
'Monday'

https://stackoverflow.com/questions/16766643/convert-date-string-to-day-of-week

 

Convert Date String to Day of Week

I have date strings like this: 'January 11, 2010' and I need a function that returns the day of the week, like 'mon', or 'monday' etc. I can't find this anywhere in the Python help. Anyone? Tha...

stackoverflow.com

 

728x90
댓글