This is a read-only copy of the MariaDB Knowledgebase generated on 2025-04-20. For the latest, interactive version please visit https://mariadb.com/kb/.

MariaDB ODBC 3.2.2 insert zero date for empty strings

Hello,

I am using the MariaDB ODBC 3.2.2 driver on rhel 9.4 and have encountered an issue with handling DateTime columns. When I insert empty values into a DateTime column, they are stored as 0000-00-00 00:00:00 (zero datetime).

Is there a way to configure the ODBC driver or MariaDB settings so that these zero datetime values are retrieved as NULL instead?

Any guidance or suggestions would be greatly appreciated.

Thank you!

Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.