Date = datetime.datetime.today().strftime("%d %B %Y")
x = datetime.datetime.strptime(Date , "%d %B %Y")
returns:
2018-05-09 00:00:00
instead of:
9 May 2018, what am I doing wrong?
Essentially I am trying to get the non zero padded version of strftime for which I searched around and I read that the way to go about it is strptime.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…