WHEN 6 THEN LEFT(CAST(@time_in AS VARCHAR(6)),2) + ':' + SUBSTRING(CAST(@time_in AS VARCHAR(6)), 3,2) + ':' + RIGHT(CAST(@time_in AS VARCHAR(6)), 2) WHEN 5 THEN '0 ...
Acts like sprintf, but placeholders are customizable, extendable, its behavior flexible and sql-oriented. DummyEscaper only for examples. i? - trying convert to int sql type positional parameter ...