I have a bunch of time formats in the following format:
"%Y-%m-%d %H:%M:%S"
Is there a quick way or a library to convert these to:
YYYY-MM-DD HH:MM:SS
My current method to do so is using a string replace, but perhaps I'll be missing some edge cases. The possible formatters I have are:
%d %b %Y %y %H %M %S %p %f %m %d %z %A
An example would be:
format.replace('%Y', 'yyyy')
And on and on...