Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Diferences between 2 given hours
Message
From
10/01/2003 17:06:44
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00740516
Message ID:
00740520
Views:
14
>How do i calculate the minutes between to given hours? does any body have a function top do so?
* This routine converts a numeric value representing seconds,
* into a character string of hh:mm:ss format.
* Anything over 24 hours is still expressed as hours e.g. 174:22:31
* expN1 Seconds
FUNCTION SecondToFormat
PARAMETERS tnSecond
LOCAL lnHour,lnMinute,lnSecond
lnHour=INT(tnSecond/3600)
lnMinute=INT((tnSecond-(lnHour*3600))/60)
lnSecond=(tnSecond-(lnHour*3600)-(lnMinute*60))
RETURN PADL(LTRIM(STR(lnHour)),2,'0')+':'+PADL(LTRIM(STR(lnMinute)),2,'0')+':'+PADL(LTRIM(STR(lnSecond)),2,'0')
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Previous
Reply
Map
View

Click here to load this message in the networking platform