Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

convertir campo hora

Hola expertos, estoy tratando de convertir un campo de "Hora" pero me muestra un error: Conversion failed when converting date and/or time from character string

SELECT

case len (t0.createtime)

when 3 then convert(time,substring(convert(nvarchar,t0.createtime),1,1)

+':'+ substring(convert(nvarchar,t0.createtime),2,2))

when 4 then convert(time,substring(convert(nvarchar,t0.createtime),1,1)

+':'+ substring(convert(nvarchar,t0.createtime),2,2))

end

FROM OSCL T0

Not what you were looking for? View more on this topic or Ask a question