LPARAMETER nElapsedSecs LOCAL dRefPoint, cReturnString dRefPoint = DTOT(DATE() ) + nElapsedSecs cReturnString = PADL(ALLTRIM(STR(HOUR(dRefPoint),2)),2,'0') + ':' + ; PADL(ALLTRIM(STR(MINUTE(dRefPoint),2)),2,'0') + ':' + ; PADL(ALLTRIM(STR(SEC(dRefPoint),2)),2,'0') RETURN cReturnStringYou can get the number of days with TTOD(dRefPoint) - DATE(). You can speed it up slightly by using a date constant in place of DATE().