Sep-05-2017, 09:26 PM
What I just discovered is the first value is the column header, the word "created" This is why the strptime fails telling me that 'created is not in the proper format.
I need to remove it from the list.
I was able to get passed that error but now I get another formatting error.
the code that is failing is
I need to remove it from the list.
I was able to get passed that error but now I get another formatting error.
Error:Traceback (most recent call last):
File "date_filter_error_report.py", line 202, in <module>
parsedData = cleanTheData(parsedData)
File "date_filter_error_report.py", line 111, in cleanTheData
cleanedData.append(datetime.strptime(values, '%d/%m/%y %H:%M'))
File "C:\Python36\lib\_strptime.py", line 565, in _strptime_datetime
tt, fraction = _strptime(data_string, format)
File "C:\Python36\lib\_strptime.py", line 362, in _strptime
(data_string, format))
ValueError: time data '6/20/2017 15:57\n' does not match format '%d/%m/%y %H:%M'
Is the new line '\n' the problem does that have to be removed?the code that is failing is
cleanedData.append(datetime.strptime(values, '%d/%m/%y %H:%M'))