Here is one way:
;WITH q AS
(
SELECT 30 AS num
UNION ALL
SELECT num + 30
FROM q
WHERE num < 24 * 60
)
SELECT dateadd(MINUTE, num, cast('00:00:00' as time))
FROM q
[EDIT]Here is an alternative, using your original method - the trick is to convert to using
minute
s in sets of 30
select distinct CAST( dateadd(minute,30 * (number-1),'01-jan-2017' ) AS TIME) as slots from master..spt_values where number>1 and number<=50 order by slots