cast(case when d.op_code like '%上午%' then substring(replace(d.op_code, '上午 ',''),5, len(d.op_code)-5)
when d.op_code like '%下午%' then substring(replace(d.op_code, substring(d.op_code,len(d.op_code)-10,5), cast(substring(d.op_code, len(d.op_code)-7,2) as int)+12),5, len(d.op_code)-5)
else substring(d.op_code, 5, len(d.op_code)-4) end as datetime)
MSSQL 时间格式
最新推荐文章于 2023-04-07 13:21:16 发布