1、sql日期转换报错
select ProductionDate,DeptName,BranchCode, BranchName,WorkshopCode,WorkshopName,item,HaltName, SUM(HaltPeriod) AS HaltPeriod , case bz when 'A' then '甲' when 'B' then '乙' when 'C' THEN '丙' end as BZ from bus_gtd where valid='1' and DeptName='炼铁事业部' and convert(varchar(10),ProductionDate,120) ='${GtoDate}' group by ProductionDate,DeptName,BranchCode,BranchName,WorkshopCode,WorkshopName,BZ,item,HaltName ORDER BY BranchCode,WorkshopCode,bus_gtd.BZ
sql 里将日期型转成字符型