I get an error while using command parameter with type \[code\]sqldbtype.datatime\[/code\]Here is the code I'm using\[code\] cmd.Parameters.Add("@Posted_date", SqlDbType.DateTime).Value = http://stackoverflow.com/questions/12580947/Convert.ToDateTime(dt.Rows["messagePostedDate"]);\[/code\]Does anyone know what might be the problem?