Answer the question
In order to leave comments, you need to log in
ValueError: time data 'Nov 13, 2017 21:30' does not match format '%d %B %Y %H:%M' What format do you need?
I'm new and I can't extract a date from a string.
I think the simplest option should look something like this:
but an error pops up:
ValueError: time data 'November 13, 2017 21:30' does not match format '%d %B %Y %H: %M'
Tell me what format is needed or what needs to be done to start writing the date from the string. dt = datetime.strptime(date1, '%d %B %Y %H:%M')
Answer the question
In order to leave comments, you need to log in
I suggest (this is your format string, if so):print(datetime.now().__format__('%d %B %Y %H:%M'))
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question