` Comment on an Icetips Article
Icetips - Templates, Tools & Utilities for Clarion Developers

Templates, Tools and Utilities
for Clarion Developers

Add a comment to an Icetips Article

Please add your comments to this article. Please note that you must provide both a name and a valid email address in order for us to publish your comment. Comments are moderated and are not visible until they have been approved. Spam is never approved!

Your Name:  
Email:  
Header text/Subject:  

Please enter your comment in the box below:

Back to article list   Search Articles     Add Comment     Printer friendly     Direct link  

Par2: Time calculations greater than 24 hours
2000-02-07 -- Sue Pichotta
 
LTimeStart and LTimeEnd are decimals. The trick is, the date is stored in the integer area, to the left of the decimal point, and the time is stored in the fractional area, to the right of the decimal point. Makes calculations across days easy. (Greg Bailey taught me this trick in my Compuserve days, and this paid for me going to DevCon one year - was the basis of a talk I gave. ) LTimeStart = PAT:Sign_In_Date + (PAT:Sign_In_Time / 8640000) LTimeEnd = PAT:Triage_Start_Date + (PAT:Triage_Start_Time / 8640000) LWait = (LTimeEnd - LTimeStart) * 1440 ! change this number to break it into min/sec IF LWait > 59 ! greater than one hour LHrs = LWait / 60 LMin = LWait % 60 LSignInTriageWait = (FORMAT(LHrs,@N3)) & ':' & (FORMAT(LMin,@N02)) ELSE LSignInTriageWait = ' :' & (FORMAT(LWait,@N02)) END (Also, remember when working with time, 0 = nothing, doesn't register. 1 is the lowest valid value, 1/100 of a second past midnight.)


Today is May 3, 2024, 7:26 pm
This article has been viewed 35114 times.



Back to article list   Search Articles   Add Comment   Printer friendly

Login

User Name:

Password: