I have a variable testeddate
which has a date in text format like 4/25/2015. I am trying convert it to %Y-%m-%d %H:%M:%S
as follows:
dt_str = datetime.strftime(testeddate,'%Y-%m-%d %H:%M:%S')
but I am running into this error:
TypeError: descriptor 'strftime' requires a 'datetime.date' object but received a 'Text'
How do I resolve this?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…