kennknowles/ocaml-freetds

Support DATE and DATETIME with TDS protocol 7.3

brendanlong opened this issue · 0 comments

In TDS protocol 7.3, FreeTDS starts returning dates as SYBMSDATE (40) and datetimes as SYBMSDATETIME2 (42). These are unhandled so the wrapper raises:

Freetds.Dblib.nextrow: dbcoltype not handled (C stub)

Unfortunately, I'm not really sure how to make this work. I tried adding these types to the SYBDATETIME conversion section, but I got all dates returned as 1900-0-01 (Microsoft's date zero).

Just creating this in case someone else knows how to make this work.