Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Converter minutos em dias, meses....
Message
From
10/05/2002 15:32:37
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00655211
Message ID:
00655235
Views:
25
This message has been marked as the solution to the initial question of the thread.
Orlando, aí está um esboço, basta adaptar para a sua necessidade.
FUNCTION TempoDecorrido
**************************************************
** Recebe número de segundos
** Retorna tempo decorrido formato ____:__:__:__
**                                 dias hh mm ss
**************************************************
LPARAMETERS nSegundos
PRIVATE nCalcSeg, nCalcMin, nCalcHor, nCalcDia
nSegundos = Round(nSegundos,0)
nCalcMin = INT(nSegundos / 60)
nCalcSeg = nSegundos - (nCalcMin * 60)
nCalcHor = INT(nCalcMin / 60)
nCalcMin = nCalcMin - (nCalcHor * 60)
nCalcDia = INT(nCalcHor / 24)
nCalcHor = nCalcHor - (nCalcDia * 24)
return( PADL(nCalcDia,4,"0") + ":" + PADL(nCalcHor,2,"0") + ":" + ;
        PADL(nCalcMin,2,"0") + ":" + PADL(nCalcSeg,2,"0") )
até mais,
Edson Gabriel Meireles
egmsoftware@bol.com.br
Previous
Reply
Map
View

Click here to load this message in the networking platform