October 14, 2009 at 3:00 am
I have a range of integer values, examples of which look like this;
151157
1000
63020
214723
I need to translate these into
15:11:57
01:00:00
06:30:20
21:47:23
Does anyone know the most efficient way of doing this?
Thanks in advance
October 14, 2009 at 3:07 am
October 14, 2009 at 3:12 am
declare @t integer
Select @t = 10000
Select @t = 151157
Select floor(@T/10000),floor(@T%10000/100.000),@T%100
October 14, 2009 at 3:15 am
No, it's not a typo but I am wondering if it should be 01:00:00. This is my main issue - there are no leading zeros and I cannot find out exactly what these times should be.
I also have values of 301, 400...
October 14, 2009 at 3:21 am
Im afraid no one here will be able to tell you if
1000 = 01:00:00 or 00:10:00.
For you sake , i hope it should be 00:10:00.
October 14, 2009 at 3:31 am
I know! I've just had a look at the distinct values and I believe that is what it is - 00:10:00.
Thanks for your help.
Viewing 6 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply