Next / Previous / Contents / Shipman's homepage

6.6. parseDatetime(): Parse external date/time

This function converts an external timestamp in the form described in Section 4.1, “Specifying dates and times on command lines”.

parseDatetime(s)

The argument s is a string containing the timestamp string. If it is valid, the function returns that timestamp as a datetime.datetime instance. If invalid, it will raise a SyntaxError exception.