how to convert a string date into datetime format in python?

How do I convert a a string of datetime into datetime format in python so that it can be compared with another date?

    string_date = "2013-09-28 20:30:55.78200"
    abc =

    if abc  > string_date :
        print True

The particular format for strptime:

    datetime.datetime.strptime(string_date, "%Y-%m-%d %H:%M:%S.%f")
    #>>> datetime.datetime(2013, 9, 28, 20, 30, 55, 782000)


Back to homepage or read more recommendations: