报错语句:
cast(replace(replace(p.deliverdate,’.’,’-‘),’/’,’-‘) as datetime)
改为
cast(replace(replace(p.deliverdate,’.’,’-‘),’/’,’-‘) as datetime2)
使用 datetime2 代替datetime
报错语句:
cast(replace(replace(p.deliverdate,’.’,’-‘),’/’,’-‘) as datetime)
改为
cast(replace(replace(p.deliverdate,’.’,’-‘),’/’,’-‘) as datetime2)
使用 datetime2 代替datetime