-- prepare test data
declare @test table (timeinfo datetime)
insert @test
select '10:05' union all
select '11:17' union all
select '12:30' union all
select '09:15' union all
select '10:00' union all
select '10:59'
declare @intervals table (minutes tinyint)
insert @intervals
select 5 union all
select 10 union all
select 15 union all
select 30 union all
select 45 union all
select 60 union all
select 90
-- do the work
select t.timeinfo,
i.minutes interval,
DATEADD(minute, (i.minutes - datediff(minute, 0, t.timeinfo) % i.minutes) % i.minutes, t.timeinfo) [nearest future time]
from @test t
cross join @intervals i
order by i.minutes,
t.timeinfo

Peter Larsson

Helsingborg, Sweden