Elapsed Time Calculation



Unicenter CA-Easytrieve Plus Report Generator: CA's information retrieval and data management tool

Elapsed Time Calculation

Postby qz2s4m » Wed Sep 30, 2009 9:53 pm

Has anyone coded Easytrieve or is there a funtion available that will assist in generating elapsed time from SMF time stamps?

Need to take in the fields like Readtime and Print End Time and calculate the difference in hours, possibly days. Definitely seems challenging when entries can span days between.

Any assistance is appreciated.

Duane
qz2s4m
 
Posts: 7
Joined: Mon Jun 29, 2009 10:08 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Elapsed Time Calculation

Postby dick scherrer » Wed Sep 30, 2009 11:50 pm

Hello,

I know of no builtin Easytrieve function to work with SMF format data.

To do what you want, suggest the code first determine if the elapsed time is greater than one day. If it is, calculate the number of full days elapsed. Then use the remainder of the time (even if it spans days, it will be less than 24 hours once the complete days have been removed from the equation) to calculate hh.mm.ss.hh. . .
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: Elapsed Time Calculation

Postby Bill Dennis » Thu Oct 01, 2009 7:59 pm

The DATE field is separate from the TIME (hundredths of seconds since Midnight) so you need to work them individually. You must account for Julian date spanning days or even years (xx08365 to xx09001).
Regards,

Bill Dennis

Disclaimer: My comments on this forum are my own and do not represent the opinions or suggestions of any other person or business entity.
Bill Dennis
 
Posts: 278
Joined: Thu May 15, 2008 9:45 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Elapsed Time Calculation

Postby dick scherrer » Thu Oct 01, 2009 11:57 pm

Hi Bill,

Thanks for the clarification :)

Re-reading what i had posted, i see where i should have been more specific. Kinda left some holes :oops:

d
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times


Return to CA-Easytrieve

 


  • Related topics
    Replies
    Views
    Last post