Ver Mensaje Individual
  #14  
Antiguo 31-10-2007
[egostar] egostar is offline
Registrado
 
Registrado: feb 2006
Posts: 6.572
Reputación: 27
egostar Va camino a la fama
Cita:
Empezado por jorgegetafe Ver Mensaje
¿Qué hago mal poniendo esto?


Código Delphi [-]
Label3.caption:= EncodeTime( (StrtoInt(hora.Text)), (StrtoInt(minuto.Text)), 
                                       (StrtoInt(segundo.Text)), (StrtoInt(msegundo.Text)) );



Donde los tres parametros que le paso son el text de los edit respectivos.

Me dice que incompatible String con tdatatime

Thanks
Necesitas pasar la variable Time a String así

Código Delphi [-]
Label3.caption:= TimetoStr(EncodeTime( (StrtoInt(hora.Text)), (StrtoInt(minuto.Text)), 
                                     (StrtoInt(segundo.Text)), (StrtoInt(msegundo.Text)) ));

Sin embargo, para que quieres hacer ese casting, no seria mas facil así:

Código Delphi [-]
Label3.Caption := hora.Text+':'+minuto.Text+':'+segundo.text;

Salud OS
__________________
"La forma de empezar es dejar de hablar y empezar a hacerlo." - Walt Disney
Responder Con Cita