not exactly the tidiest way but nonetheless a way that works.
Code:
declare @x int
set @x = 100019 --you want to return 00010
select @x/3600 as hours, (@x - ((@x/3600)*3600))/60 as minutes, (@x - ((@x/3600)*3600) - ((@x - ((@x/3600)*3600))/60)*60) as seconds
"I'm living so far beyond my income that we may almost be said to be living apart
You can add a CONVERT ( ) and SUBSTRING ( ) to get the portion of the datetime that you want. If the day is an issue then just replace the 0 with the appropriate start date.
-Karl
[red] Cursors, triggers, user-defined functions and dynamic SQL are an axis of evil![/red]
[green]Life's uncertain...eat dessert first...www.deerfieldbakery.com[/green]
vongrunt's answer solved my problem. i was surprised at the result. i had done it in a messy way before. now, i'm going to change it to 108 format. thanks a lot vongrunt
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.