Hola amigos foxeros,
les traigo un problema que se me presenta,
estoy tratando de calcular la hora transcurrida en base a la hora ingresada,
en el init del form hay el siguiente codigo:
***********************************************************************************************************************************************************************************************
PUBLIC nHour, nMinute, nSec
STORE HOUR(DATETIME()) TO nHour
STORE MINUTE(DATETIME()) TO nMinute
STORE SEC(DATETIME()) TO nSec
ThisForm.lblTiempoTranscurrido.Caption = PADL(ALLTRIM(STR(nHour)),2,"0") + ":" + PADL(ALLTRIM(STR(nMinute)),2,"0") + ":" + PADL(ALLTRIM(STR(nSec)),2,"0")
***********************************************************************************************************************************************************************************************
y en el timer lo siguiente:
*********************************************************************
LOCAL xHour, xMinute, xSec
STORE HOUR(DATETIME()) TO xHour
STORE MINUTE(DATETIME()) TO xMinute
STORE SEC(DATETIME()) TO xSec
ThisForm.lblTimer1.Caption = TRANSFORM(DATETIME())
ThisForm.lblTiempoTranscurrido.Caption = ;
PADL(ALLTRIM(STR(xHour-nHour)),2,"0") + ":" + ;
PADL(ALLTRIM(STR(xMinute-nMinute)),2,"0") + ":" + ;
PADL(ALLTRIM(STR(xSec-nSec)),2,"0")
*********************************************************************
ahora bueno esta que corre el reloj en el lblTiempoTranscurrido pero,
aveces me bota negativo y no se como solucionarlo y creo que la resta la esta haciendo mal,
me podrian ayudar en como podria solucionarlo porfavor,
desde ya muchas gracias,
saludos y bendiciones,
rudolf heiner.