If you provide a sample of your code, I can amend this answer to be more specific to your requirements. If this answer is deemed superfluous to the answer given in the quoted question, let me know, and I'll delete it.
I should make it clear, the following is a near exact replication of the answer to this question here: datetime to string with series in python pandas.
For some data frame:
df = pandas.Series(['20010101', '20010331'])
0 20010101
1 20010331
dtype: object
# Convert to the format you need:
dates = pandas.to_datetime(A, format = '%Y-%m-%d')
0 2001-01-01
1 2001-03-31
dtype: datetime64[ns]
# Then to convert back, do:
df2 = dates.apply(lambda x: x.strftime('%Y-%m-%d'))
0 2001-01-01
1 2001-03-31
dtype: object