Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Converting nos of seconds to time format.
Message
 
To
12/02/2001 00:59:11
Rahul Murarka
Sys-Con Engineering
Kolkata, India
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00474883
Message ID:
00474914
Views:
16
>Dear Sirs,
>
>Hello & Regards.
>
>After claculating form to time I got no of sec now I want to display that no of seconds in time format. I can do it by writing a full programme. But if there is any simple of built in function. Please help.
>
>
>Rahul.

See this function:
*-------------------------------------------------------
* FUNCTION Sec2Hours(nSegundos)
*-------------------------------------------------------
* Transform seconds to format hhHH:MM:SS
* USE: Sec2Hours(nSegundos)
* RETURN: Caracter '[hh]HH:MM:SS'
*-------------------------------------------------------
FUNCTION Sec2Hours(nSegundos)
lpara nSegundos
 LOCAL lnHoras, lnMinutos, lnSegundos
 lnHoras = INT(nSegundos/3600)
 lnMinutos = INT(((nSegundos-(lnHoras*3600))/60))
 lnSegundos = MOD(nSegundos,60)
 RETURN IIF(lnHoras<100,TRANSFORM(lnHoras,"@L 99"), ;
  TRANSFORM(lnHoras,"@L 9999")) +":"+ ;
  TRANSFORM(lnMinutos,"@L 99")+":"+ ;
  TRANSFORM(lnSegundos,"@L 99")
ENDFUNC
*-------------------------------------------------------
Luis María Guayán
Tucumán, Argentina
________________________________
SysOp de www.PortalFox.com
Nada corre como un zorro
________________________________
Previous
Reply
Map
View

Click here to load this message in the networking platform