Python is a powerful general-purpose programming language.

How to convert a date string to different format

Question or problem about Python programming: I need to convert date string “2013-1-25” to string “1/25/13” in python. I looked at the datetime.strptime but still can’t find a way for this. How to solve the problem: Solution 1: I assume I have import datetime before running each of the lines of code below datetime.datetime.strptime(“2013-1-25”, ‘%Y-%m-%d’).strftime(‘%m/%d/%y’) […]

Continue Reading