DROP Table #SampleTable
CREATE Table #SampleTable (
Insert Into #SampleTable Values('9436');
Insert Into #SampleTable Values('537');
Insert Into #SampleTable Values('9323');
Insert Into #SampleTable Values('12525');
-- To calculate Total Hours and Minutes
Cast(numasdate / 60 as Varchar) + ' hours ' +
Cast(numasdate % 60 as Varchar) + ' minutes'
9436 157 hours 16 minutes
537 8 hours 57 minutes
9323 155 hours 23 minutes
12525 208 hours 45 minutes
Thank you, so much rubbish to sort through on the web finding this site was amazing, worked first time and a nice query, cheers.
Post a Comment
Sign up to receive breaking news as well as receive other site updates!
Copyright © 2009-2013All Rights Reserved for SQLServerCurry.com by Suprotim Agarwal
| Terms and Conditions