7days of seconds into hh:nn:ss

mkheys

New member
Local time
Today, 14:44
Joined
Mar 1, 2010
Messages
1
Hi All

I am trying to convert a sum of secondd from my telephony platform for 7 days. I have succesfully changed 1 days data into hh:nn:ss using
Format(((sum([field]))/86400),"hh:nn:ss"), and then tried to use, Format(((Sum([ti_stafftime]))/604800),"hh:nn:ss") to change the 7 days of information

EG total hours for the week 114613 = 31:50:08
 
Hi All

I am trying to convert a sum of secondd from my telephony platform for 7 days. I have succesfully changed 1 days data into hh:nn:ss using
Format(((sum([field]))/86400),"hh:nn:ss"), and then tried to use, Format(((Sum([ti_stafftime]))/604800),"hh:nn:ss") to change the 7 days of information

EG total hours for the week 114613 = 31:50:08

this is complicated, but not so much to me. here is the math solution that you could use:
PHP:
SELECT ROUND([FIELD]/60/60, 2) AS [GROSS HOURS],

ROUND(RIGHT([GROSS HOURS], 2) * 60, 2) AS [GROSS MINUTES],

ROUND(RIGHT([GROSS MINUTES], 2) * 60, 2) AS [GROSS SECONDS], 

ROUND([GROSS HOURS], 0) & ":" &

ROUND([GROSS MINUTES], 0) & ":" & 

ROUND([GROSS SECONDS], 0) AS [TOTAL HOURS FOR THE WEEK]
the first 3 fields are just there to show you how to get to the end result. if using this in a query, do not SHOW these columns, but only the last one, which is the output you apparently want here.
 
Hi -

Give this a try:

Code:
x = 114613 
? Format(x \ 3600, "00") & ":" & Format((x Mod 3600) \ 60, "00") & ":" & Format(x Mod 60, "00")
[B][I]31:50:13[/I][/B]

HTH - Bob
 

Users who are viewing this thread

Back
Top Bottom