Python convert date string to timestamp
Question: I need to convert string type _Wed, 18 May 2016 11:21:35 GMT_ to timestamp, in
Python. I'm using:

    
    
    datetime.datetime.strptime(string, format)
    

But I don't want to specify the format for the date type.


Answer: > But I don't want to specify the format for the date type.

Then, let the [`dateutil`](https://labix.org/python-dateutil) parser figure
that out:

    
    
    >>> from dateutil.parser import parse
    >>> parse("Wed, 18 May 2016 11:21:35 GMT")
    datetime.datetime(2016, 5, 18, 11, 21, 35, tzinfo=tzutc())
    

