Skip to content

Abstime is not handled properly - ODI = 702 #61

@KrzysztofDusko

Description

@KrzysztofDusko

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions