${if(班次 == '夜班',"'"+开始日期+" 20:30:59'","'"+开始日期 + " 08:30:59'")}if这样写法对不对????写错了,完整的sql语句是这样的SELECT MAX(volume) maxvol,towernumber FROM catch_gas WHERE CONVERT(varchar(100), time,20)>=${if(班次 == '夜班',"'"+开始日期+" 20:30:59'","'"+开始日期 + " 08:30:59'")}AND CONVERT(varchar(100), time, 20) <=${if(班次 == '白班',"'"+结束日期 +" 20:30:59'","'"+结束日期+1 + " 08:30:59'")}我用if是为了依据班次为条件获取一个时间的值,这个日期的计算一脸懵逼!!要怎么写这个日期的计算?????