-1

The error that I seem to get is

ValueError: time data '2010-10-15' does not match format '%y-%m-%d'

I am failing to understand what is wrong here. Could someone please guide to what am I missing?

from datetime import datetime

year = datetime.strptime(data[1].split(" ")[0], "%y-%m-%d")
Buggy Coder
  • 383
  • 5
  • 17

1 Answers1

1

Try this parsing String : "%Y-%m-%d". It should work. Refer the python docs

Hari Roshan
  • 344
  • 4
  • 10