时间
DateTime MyDate;
if (DateTime.TryParse(txtStartDate.Text.Trim(), out MyDate) == true)
{
int year = Convert.ToInt32(MyDate.Year);
int month = Convert.ToInt32(MyDate.Month);
strWhere +="and year([Date])= " + year + " and month([Date])=" + month + "";
}
strWhere +=" and year([Date])= " + year + " and month([Date])=" + month + "";
转换字段 数据类型
convert(int," + filed + ")
select sum(convert(int," + filed + ")+convert(int," + filed1 + ")) from AccuracyModifyInfo