HomeDateTime time data ' 12:00:00' does not match format '%H:%M:%S' byMahabubur Rahman -November 15, 2022 0 There's a leading space in the string: ' 12:00:00' Do this:datetime.strptime(' 12:00:00'.split('-')[1].strip(), '%H:%M:%S').time() Tags DateTime Python Facebook Twitter