Time Stamp
Pickering, John (NORBORD)
PICKERIJ@norbord.com
Mon, 28 Feb 2000 10:51:54 -0500
BTDT. Try the code below.
It's your job to ensure that date-time-IN is before date-time-OUT or you'll
get data expression errors or nonsense.
Regards,
JWP
Toronto
DEFINE D-DATE-IN DATE = parm
DEFINE D-TIME-IN INT*4 = parm
DEFINE D-DATE-OUT DATE = parm
DEFINE D-TIME-OUT INT*4 = parm
DEFINE D-ELAPSED-TIME INT*6 &
= (1440 * (DAYS(D-DATE-OUT) - DAYS(D-DATE-IN))) &
+ ((FLOOR(D-TIME-OUT / 100) * 60) + MOD(D-TIME-OUT,100)) &
- ((FLOOR(D-TIME-IN / 100) * 60) + MOD(D-TIME-IN,100)) &
IF 0 NE D-DATE-OUT &
ELSE 0
> -----Original Message-----
> From: Chris Gassett [SMTP:CGassett@spectra-inc.com]
> Sent: Monday, February 28, 2000 10:40 AM
> To: Powerhouse Forum (E-mail)
> Subject: Time Stamp
>
> Anyone know how to quickly and efficiently get the number of hours and
> minutes passed between a starting and ending time stamp using Quick?
>
> The user would enter a field and then update the record. Sometime in the
> near future the record would be accessed, another field would be inputed,
> and then the record would be updated again.
>
> PROCEDURE PROCESS INPUTED_FIELD
> BEGIN
> LET TIME_START = ASCII(SYSDATE) + ASCII(SYSTIME)
> END
>
> PROCEDURE PROCESS OTHER INPUTED_FIELD
> BEGIN
> LET TIME_END = ASCII(SYSDATE) + ASCII(SYSTIME)
> LET ELAPSED_TIME = TIME_END - TIME_START
> END
>
> I need to measure the amount of time between the two updates.
>
>
> Powerhouse Version 733d3
> Running on an HP9000
>
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
Subscribe: "subscribe powerh-l" in message body to majordomo@lists.swau.edu
Unsubscribe: "unsubscribe powerh-l" in message to majordomo@lists.swau.edu
This list is closed, thus to post to the list, you must be a subscriber.