title: How to resolve this error - ValueError: time data did not match format:
body: <p>I have a python code where I extract a date string (from a web page) which I then try to convert into a dateobject before using it. It has been working all along but since today I've been getting this error</p>
  
  <pre><code>ValueError: time data did not match format:  data=Sun, 17 Jul 2011 23:51:19  fmt=%a, %d %b %Y %H:%M:%S
  </code></pre>
  
  <p>This is my code</p>
  
  <pre><code>myDate = --get date from user. Example is Sun, 17 Jul 2011 23:51:19---
  #convert date from string
  newDate = datetime.datetime.strptime(myDate,'%a, %d %b %Y %H:%M:%S')
  </code></pre>
  
  <p>I've checked the source of the date string and it is still formatted as Sun, 17 Jul 2011 23:51:19. Can anyone tell me what I am missing?</p>
  
  <p>Thanks</p>