Here is a snippet of my code. I read the date from a string and trying to insert into a redshift database, but I'm getting errors while passing the dates.
The dates passed are in the following format: dd-mm-yyyy
Failed to insert record into school_holidays table date/time field value out of range: "29-01-2019" HINT: Perhaps you need a different "datestyle" setting.
postgres_insert_query = """ INSERT INTO vacation (jurid, startdate, enddate, description) VALUES (%s,%s,%s,%s)"""
record_to_insert = (state, startdate, enddate, description)
cursor.execute(postgres_insert_query, record_to_insert)