/detediff 函数计算 day ,month 等 示例,计算天数差: select datediff(day,BEGINTIME,ENDTIME) as PlanTimer from tableName