I have a datetime field with a really silly format:
2016423123
where 2016
is the year, 4
is the month, 23
is the day, and 123
is irrelevant.
Does the format
parameter of datetime.strptime
support directives (like a regex) to ignore characters in the input string?
I know it is possible to just remove the extra characters and then feed the result to the parser, but I have a problem where I have several possible formats (not my invention...), and I was thinking of using try/catch to parse them.