Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Hours & minutes from seconds
Message
From
13/09/1999 16:11:23
 
 
To
13/09/1999 15:55:08
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00264179
Message ID:
00264190
Views:
23
Hi Kris:

Try this:
PROCEDURE maketime
LPARAMETERS nSecs
IF nSecs=0
  cDuration="00:00:00"
ELSE
  STORE 0 TO nHours,nMinutes,nSeconds
  cDuration=""
  nHours=INT(nSecs/3600)
  nMinutes=INT((nSecs-(nHours*3600))/60)
  nSeconds=nSecs-((nHours*3600)+(nMinutes*60))
  cDuration=PADL(nHours,2,"0")+":"+PADL(nMinutes,2,"0")+":"+PADL(nSeconds,2,":")
ENDIF
RETURN cDuration
>I have a field that is the duration of a call in seconds. Does anyone have a calculation to convert this duration into hours and minutes?
>
>TIA
>
>Kris
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform