Skip to content

Handeling DATE type #55

Answered by ghost
ghost asked this question in Q&A
Sep 2, 2022 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

This was resolved using Outupthandler & Outconverter
def datetime_to_date(value):
return datetime.date.strftime(value,"%Y-%m-%d")

def output_type_handler(cursor, name, default_type, size, precision, scale):
if default_type == odb.DB_TYPE_DATE:
return cursor.var(datetime.date, arraysize=cursor.arraysize,outconverter=datetime_to_date)

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@anthony-tuininga
Comment options

Answer selected
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant