Time conversion

0

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,
(cast(left(workedhours, 2) as int) * 60) + cast(right(workedhours, 2) as int)

from @t;

Enter Parameters

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