I have two sqlParameters @pFromDate and @pToDate. A stored procedure selects rows from a table between the from date and to date that are entered into two textboxes on a form. When i try to convert the dates that the user types into the textboxes i get the error arithmetic overload when converting to data type date time. here is my code:<BR><BR>private void cmdSales_Click(object sender, System.EventArgs e)<BR> {<BR> <BR> <BR> SqlConnection conn = new SqlConnection("data source=NT20;initial catalog=SUN426ADB;integrated security=SSPI;persist security info=False;workstation id=PC2677;packet size=4096");<BR> SqlDataAdapter da;<BR> DataSet ds;<BR> SqlParameter workParam;<BR><BR> da = new SqlDataAdapter("stpLOCPYDates", conn);<BR> da.SelectCommand.CommandType = CommandType.StoredProcedure;<BR><BR> workParam = new SqlParameter("@pFromDate", System.Data.SqlDbType.DateTime);<BR> workParam.Direction = ParameterDirection.Input;<BR> <BR> workParam.Value = Convert.ToDateTime(txtStartDate.Text);<BR> //workParam.Value = dtsStartDate.SelectedDate.Date;<BR><BR> <BR> <BR> da.SelectCommand.Parameters.Add(workParam);<BR><BR > workParam = new SqlParameter("@pToDate", System.Data.SqlDbType.DateTime);<BR> workParam.Direction = ParameterDirection.Input;<BR> workParam.Value = Convert.ToDateTime(txtEndDate.Text);<BR> //workParam.Value = dtsEndDate.SelectedDate.Date;<BR> <BR> da.SelectCommand.Parameters.Add(workParam);<BR><BR > ds = new DataSet();<BR> da.Fill(ds, "dbo.SSRFACC");<BR><BR> dgSales.DataSource = ds;<BR> dgSales.DataBind();<BR><BR> <BR><BR> }