when i try to insert a record through .net using oledb it is inserting wrong data
public void param()
{
OleDbCommand cmd2 = new OleDbCommand("INSERT INTO PARAM_INF(PRM_FRM_DT,PRM_TO_DT) values(to_date('01-Jul-2014'),to_date('01-Jul-2014'))", con) { CommandType = CommandType.Text };
if (con.State == ConnectionState.Closed)
{
con.Open();
}
cmd2.ExecuteNonQuery();
con.Close();
}
result select prm_frm_dt,prm_to_dt from PARAM_INF;
PRM_FRM_DT PRM_TO_DT
------------------ ------------------
20-JUL-01 02:00:00 20-JUL-01 02:00:00
But the same insert statement from sqldeveloper or sqlplus result is proper.
select prm_frm_dt,prm_to_dt from PARAM_INF;
PRM_FRM_DT PRM_TO_DT
------------------ ------------------
01-JUL-14 12:00:00 01-JUL-14 12:00:00