on 2015 Sep 23 12:46 PM
Hi I am converting seconds into time and I used the following formula:
=FormatNumber(Floor([Elapsed Time]/3600) ;"0") + ":" +
FormatNumber(Floor(Mod([Elapsed Time];3600)/60);"00") + ":" +
FormatNumber(Mod(Mod([Elapsed Time] ;3600) ;60) ;"00")
The problem I now have is it is giving time as
0:02:50 |
1350:07:59 |
:: |
0:11:15 |
5:05:35 |
359:55:49 |
:: |
0:01:33 |
6:32:38 |
:: |
0:04:20 |
0:25:53 |
3:38:58 |
72:00:04 |
:: |
0:02:32 |
0:16:19 |
3:41:01 |
How do I convert something like second row above 1350:07:59 as days which is 56.
Please help.
Thanks,
Request clarification before answering.
Can you try this:
select
case when floor(130805.75/3600) < 10 then '0' || floor(130805.75/3600)
else '' || floor(130805.75/3600)
end
|| ':'||
case when mod(130805.75,3600) = 0 then '00'
when mod(130805.75,3600) > 0 and mod(130805.75,3600) < 600 then '0' || floor(mod(130805.75,3600)/60)
else ''||floor(mod(130805.75,3600)/60)
end
|| ':'||
case when mod(130805.75,3600) = 0 then '00'
when mod(130805.75,60) < 60 and mod(130805.75,60) < 10 then '0'|| floor(mod(130805.75,60))
when mod(130805.75,60) < 60 and mod(130805.75,60) >= 10 then ''|| floor(mod(130805.75,60))
end
from dummy;
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
58 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.