Ver Mensaje Individual
  #2 (permalink)  
Antiguo 19/05/2010, 12:04
Avatar de lokoman
lokoman
 
Fecha de Ingreso: septiembre-2009
Mensajes: 502
Antigüedad: 15 años, 6 meses
Puntos: 47
Respuesta: Trabajo con fechas largas

Hola!!
Que te parece este codigo:
Código vb:
Ver original
  1. Dim Fecha1 As Date, Fecha2 As Date
  2.     Fecha1 = "16/05/2010 12:00:00"
  3.     Fecha2 = "19/05/2010 14:05:03"
  4.    
  5.     MsgBox DateDiff("d", Fecha1, Fecha2) & " dias " _
  6.                     & Val(Format(TimeValue(Fecha2), "hh")) - Val(Format(TimeValue(Fecha1), "hh")) & " horas " _
  7.                     & Val(Format(TimeValue(Fecha2), "nn")) - Val(Format(TimeValue(Fecha1), "nn")) & " minutos " _
  8.                     & Val(Format(TimeValue(Fecha2), "ss")) - Val(Format(TimeValue(Fecha1), "ss")) & " segundos"

!!