1: 2: 3: 4:
(case when (completeddttm > '13:29' and completeddttm < '17:01') then '13:30-17' when (completeddttm > '17:01' or completeddttm < '02:00') then '17-2' when (completeddttm > '02:00' and completeddttm < '08:00') then '2-8' end)
1:
... cast(convert(varchar, completeddttm, 108) as datetime)...