CREATE proc usp_存储过程
@ksrq ut_rq8,
@jsrq ut_rq8,
as
/*
注释
*/
set nocount on
select substring(@ksrq,1,4)+'-'+substring(@ksrq,5,2)+'-'+substring(@ksrq,7,2) '开始日期',
substring(@jsrq,1,4)+'-'+substring(@jsrq,5,2)+'-'+substring(@jsrq,7,2) '结束日期'
from 表(nolock)
把20230601转换成2023—06—01