본문으로 바로가기

Function getTimeStringSeconds(seconds) 

Dim hourTxt, minTxt, secTxt 



If seconds > 0 Then

If fix(seconds / 3600) > 0 Then 

hourTxt = fix(seconds / 3600) 

If Len(hourTxt) = 1 Then hourTxt = "0" & hourTxt

Else 

hourTxt = "00"

End If 


If fix((seconds MOD 3600) / 60) > 0 Then 

minTxt = fix(((seconds) MOD 3600) / 60)

If Len(minTxt) = 1 Then minTxt = "0" & minTxt 

Else 

minTxt = "00"

End If 

If fix(seconds MOD 60) > 0 Then 

secTxt = (seconds MOD 60)

If Len(secTxt) = 1 Then secTxt = "0" & secTxt

Else 

secTxt = "00"

End If 


End If 

getTimeStringSeconds = hourTxt & ":" & minTxt & ":" & secTxt


End Function




자바스크립트 

http://devlink.tistory.com/26