Iam try execute my SQL: sample class with SQL.
Code: Select all
public List<Item> GetAllItens(int id, DateTime dateIni, DateTime dateEnd)
{
try
{
string dateIn= dateIni.ToString("dd/MM/yyyy");
string dateEn = dateEnd.ToString("dd/MM/yyyy");
var sql = $@"SELECT *
FROM ITEM
WHERE ID = {id}
AND TRUNC(DATEMOV) BETWEEN '{dateIn}' AND '{dateEn}'";
return SqlQuery<Item>(sql);
}
catch (Exception ex)
{
throw ex;
}
}
Devart.Data.Oracle.OracleException (0x80004005): ORA-01843 not a valid month
Whats is this ???
My format date is the Brazilian