I am parsing some datetime strings in Python 2.7 using datetime.strptime . I want to assume that the date is before.
But the strptime %y operator does not do this by default:
d = '10/12/68' n = datetime.strptime(d, '%d/%m/%y') print n 2068-12-10 00:00:00
Is there any way to get Python to suggest that 68 is 1968 , as it would be in normal use?
Or do you just need to parse the string and insert 19 or 20 , if necessary, manually?
source share