Time conversion


Please login or register to vote for this query.

(click on this box to dismiss)

IT Security Meta

Q&A about the site for information security professionals

declare @t as table(workedHours nvarchar(10));
insert into @t
select '07:30' union all
select '11:55' union all
select '01:00' union all
select '03:05';

select workedHours,
left(workedhours, charindex(':', workedhours, 1) - 1)
from @t;

Enter Parameters

Switch to main site
loading Hold tight while we fetch your results