Skip to content
Advertisement

Tag: strptime

A faster strptime?

I have code which reads vast numbers of dates in ‘YYYY-MM-DD’ format. Parsing all these dates, so that it can add one, two, or three days then write back in the same format is slowing things down quite considerably. Any suggestions how to speed it up a bit (or a lot)? Answer Python 3.7+: fromisoformat() Since Python 3.7, the datetime

Advertisement