May-11-2018, 10:42 AM
Just for completeness, let's show transformation using
datetime.datetime
, because it would be useful for more complicated formats/conversionsfrom datetime import datetime d = "2018/01/02" print(datetime.strftime(datetime.strptime(d, '%Y/%m/%d'), '%Y%m%d'))
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs