Trying to read some data from our postgres data using openquery and then also trying to read it using python using psycopg2 library.
in postgres there is a record with date column value: 194809-01-13 when we query this record using openquery, it interprets this value as: 1948-03-23
when connect to postgres DB using python, it throws an error: "year 194809 is out of range"
can someone help with this problem and also help me understand:
- how did openquery interpret 194809-01-13 to 1948-03-23
- and how to do the same via python
tried to read this column as String/Text, and python is able to read it, but it doesnt correct the date.
Need to understand logic used by openquery and do similar processing on python side