0
I need to convert the date of format 'Aug 29, 2019' to 06/08/2019 however I am not getting with strptime, Follow the error.
Valueerror: time data 'Aug 29, 2019' does not match format ' %m %d, %Y'
0
I need to convert the date of format 'Aug 29, 2019' to 06/08/2019 however I am not getting with strptime, Follow the error.
Valueerror: time data 'Aug 29, 2019' does not match format ' %m %d, %Y'
2
You can use the datetime.strptime
for this, see the example below:
import datetime
dataString = 'Aug 29, 2019'
dataObj = datahora = datetime.datetime.strptime(dataString,'%b %d, %Y')
print(dataObj.date())
#E pode formatar a saída do jeito que achar melhor
print(dataObj.date().strftime('%d-%m-%Y'))
Browser other questions tagged python-3.x date
You are not signed in. Login or sign up in order to post.
I don’t understand why the negative votes in the polls here in the O.R.
– Alisson Pelizaro
I share your question, some seem to be born knowing everything.
– Willian Jesus Da Silva