[python] How to convert a date string to different format