How to convert a string date to a timestamp in Python Use datetime.datetime.timestamp() Use time.mktime()