Ver Mensaje Individual
  #5 (permalink)  
Antiguo 21/06/2010, 06:55
Avatar de Adler
Adler
Colaborador
 
Fecha de Ingreso: diciembre-2006
Mensajes: 4.671
Antigüedad: 17 años, 4 meses
Puntos: 126
Respuesta: Convertir Segundos a Horas Minutos Segundos

Hola

Sí, son menos lineas, pero te saltas todo este código para dar formato

Código ASP:
Ver original
  1. If(minutosmod<10) Then minutosmod ="0"&minutosmod End If
  2.    If(segundosmod<10) Then segundosmod ="0"&segundosmod End If
  3.    If segundosonline < 60 Then
  4.       tiempo = segundosonline&" segundos"
  5.    ElseIf segundosonline > 60 And segundosonline < 3600 Then
  6.       tiempo = minutosmod&":"&segundosmod&" minutos"
  7.    Else      tiempo = horasonline&":"&minutosmod&":"&segundosmod&" horas"
  8.    End If

Por otro lado, haces demasiadas operaciones matemáticas por no usar la función DateDiff()
De cualquier modo se agradece
__________________
Los formularios se envían/validan con un botón Submit
<input type="submit" value="Enviar" style="background-color:#0B5795; font:bold 10px verdana; color:#FFF;" />