I have this insert:
insert into sap_paghe (nome_elaborazione, data_elaborazione, tipo, data_registrazione, data_scadenza, data_documento, osservazioni, data_allocazione_iva) values ('Nome elaborazione', '2021-12-22', 'H', '2021-01-31', '2021-01-31', '2021-01-31', 'RETRIBUZIONI GEN. 2021', '2021-01-31');
which perfectly works from SQLWorkbench but gives this error using C#
ERROR [HY000] [Informix][Informix ODBC Driver][Informix]Invalid year in date
I'm 100% sure the connection works because other inserts work fine, it's just the ones with the date. Any suggestion?
Here's the code:
OdbcCommand command = new OdbcCommand(insert..., DbConnection);
dataAdapter.InsertCommand = command;
dataAdapter.InsertCommand.ExecuteNonQuery();
command.Dispose();