DATEADD(day,-6,Duetime) <= GETDATE()
//在DataView中排序
strSql += strWhere + " ";
strSql += " and Pmn_ExecutePlanDate>getdate()";
strSql += " and getdate()< DATEADD(dd,-Pmn_PReTimeSpan,Pmn_ExecutePlanDate)";
//条件判断
DATEDIFF(datepart, startdate, enddate)
一下是diff的参数
Datepart Abbreviations
year yy, yyyy
quarter QQ, q
month mm, m
dayofyear dy, y
day dd, d
week wk, ww
hour hh
minute mi, n
second ss, s
millisecond ms