Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Abstime is not handled properly - ODI = 702 #61

Open
KrzysztofDusko opened this issue Mar 5, 2022 · 0 comments
Open

Abstime is not handled properly - ODI = 702 #61

KrzysztofDusko opened this issue Mar 5, 2022 · 0 comments

Comments

@KrzysztofDusko
Copy link

KrzysztofDusko commented Mar 5, 2022

Abstime data type is treated as integer
Article from IBM
https://www.ibm.com/support/pages/how-use-abstime-data-type-nzsql

place in code (not handled 702)

nzpy/nzpy/core.py

Line 1336 in e71bf64

lambda: (FC_TEXT, text_recv), {

Timestamp

import nzpy

conn = nzpy.connect(user="admin", password="password",host='localhost', port=5480, database="db1", securityLevel=1,logLevel=0)

with conn.cursor() as cursor:
    try:
        cursor.execute("SELECT CREATEDATE FROM _V_TABLE_STORAGE_STAT LIMIT 1")
        results = cursor.fetchall()
        for c1, in results:
            print(c1)
    except Exception as e:
        print(str(e))

RESULTS results
image

Notice IBM Netezza ODBC driver is fine (datatime is returned), Java and NET driver have similar issues (return integer ins Java , byte array.. in NET)
Notice2 seems than this equation works

'1970-01-01' + numer returned by driver [seconds] = real datetime
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant