You are doing the most dangerous error here, and you think removing the time part will solve your problem.
To be true to your - bad - solution, the problem is that you do not enclose date-time with quotes, so
idate
value can not be interpreted by SQL...
BUT! The true problem is that you are using string concatenation to pass values to SQL. This technique opens your system to SQL injections...
Let say that you send parameters from a user to your SQL. What will happening if your user writes this in the username box:
;DROP TABLE bar;--
You have to learn how to use
parameterized queries[
^]..
cmd.CommandText="insert into tbl(id,idate) values(@id, @idate)";
cmd.Parameters.Add("@id", SqlDbType.Int).Value = id
cmd.Parameters.Add("@idate", SqlDbType.DateTime).Value = idate
cmd.ExecuteNonQuery();