select top 100 SUBSTRING(convert(varchar(30),happen_time,121),11,9)as 发生时间,objectName1 as 经销商名称, objectName2 as 门店名称,objectName3 as 扫码产品,qty as 需扫码数量,scannumber as 已扫码数量from t_sys_cksmsssjwhere happen_time>='${if(len(stimes)=0,stimes,GETDATE())}' and happen_time <='${if(len(etimes)=0,etimes,GETDATE()+1)}' order by happen_time desc字符串转换日期和/或时间时,转换失败。