|
Andy, not sure if you really meant *MDY for your fields, but i did something very similar just recently. here is what i have: *time stamps: D $BegTime S z D $EndTime S z *elapsed time datastructure: D ds D $Elapse 7s 0 inz D $HHH 3s 0 inz overlay($Elapse) D $MM 2s 0 inz overlay($Elapse:*next) D $SS 2s 0 inz overlay($Elapse:*next) *set beginning time C time $BegTime <snip> * set end time, calculate elapse time C time $EndTime C eval $HHH = %diff($EndTime:$BegTime:*h) C eval $MM = %diff($EndTime:$BegTime:*mn) - C ($HHH*60) C eval $SS = %diff($EndTime:$BegTime:*s) - C (($HHH*3600) + ($MM*60)) * $elapse now contains HHHMMSS between beg and end times. hth, rick ----original message--------- I have two date fields *MDY with these values. '18:09:04' and '16:26:57'. All I want to do is find the total elapsed time in hours,minutes and seconds between them. I'm using the SUBDUR like this; EndTime SUBDUR StartTime Hour:*H EndTime SUBDUR StartTime Minute:*MN EndTime SUBDUR StartTime Second:*S Hour,Minute and second are part of a 6,0 data structure. When I put my program in debug my 'elapsed' variable contains 010227. I suspect its because of negatives I'm getting the minutes and seconds the way I am. What am I missing here? (Should I be doing this differently then SUBDUR?) Andy
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.