See this example below - what it seems like is, dtwrkd is a column that has a date (perhaps with a time component). The first part is taking that date+time and picking up only the date part. Then, the time portion is stored in strttm as a character string in the HHMM format. The rest of the statement is splitting that and inserting a colon. Run this and you will see what I mean.DECLARE @dtwrkd DATETIME = '2013-07-01 15:21:01.857';DECLARE @strttm VARCHAR(32) = '1134'SELECT CONVERT(VARCHAR(10), @dtwrkd, 101) + CASE WHEN @strttm IS NOT NULL AND @strttm != '' THEN ' ' + SUBSTRING(@strttm, 1, 2) + ':' + +SUBSTRING(@strttm, 3, 2) ELSE '' END