[Answer]-DataError for a DateTime?

1👍

The problem does not seem to be with the date field, but with the ReportKey string field.

As mentioned, it is not idiomatic in Python to call the double-underscore methods like foo.__str__() directly. You should call the built-in functions: str(foo). Even better though is to use string interpolation:

ReportKey = "DetailedReport.{}.{}.{}".format(year, month, clientId)

Leave a comment