|
Go
![]() |
New
![]() |
Search
![]() |
Notify
![]() |
Tools
![]() |
Reply
![]() |
|
|
Member |
hello all,
just a little heads up, i'm new to the site and pretty new to wf so please bare with me if i don't describe my troubles correctly. i was wondering if anyone can help me with this task. i can find the difference in time between two seperate columns but what is troubling me is finding the total time in a specific column. which format would make this the easiest process and how would you go about executing it?? for example. . . Time 00:00:30 00:00:08 00:00:25 Total 00:01:03 currently, the format i have is either HHIS or a concatenated field of hours, minutes, and seconds each in I2 format. i can get the total time in seconds but then it isn't in a time format. any help would be greatly appreciated, thanks! pt pt WF7.1 XPpro "Trying is the first step towards failure." - Homer J. Simpson |
||
|
|
Virtuoso |
I found it amazing that in many years of coding FOCUS, I have never had the occasion to SUM a time field! I don't believe there is any sort of function for this an I don't know how (or if) a standard SUBTOTAL would handle this.
You probably know that there are many ways to accomplish a given task, so here's the obvious suggestion: simply do "modular" division on the seconds in a series of computes and you should get what you need. Assume the field containing seconds is called SECONDS. You'll need to SET SUMMARYLINES=NEW COMPUTE HOURS/I3=INT(SECONDS/3600); COMPUTE MINUTES/I2=INT(SECONDS/60)-(HOURS* 60); COMPUTE REM_SECONDS/I2L=SECONDS - (HOURS*3600) - (MINUTES*60); COMPUTE TOTALTIME/A9=EDIT(HOURS)|':'|EDIT(MINUTES)|':'|EDIT(REM_SECONDS) ; Then ON TABLE SUMMARIZE HOURS MINUTES REM_SECONDS SUM. TOTALTIME Regards, Darin WF Server: 7.1.6 on Z/OS and Linux, ReportCaster, Self-Service, MRE, Java Data: DB2, DB2/UDB, Adabas, SQL Server Output: HTML,PDF,Excel2K WF Client: Linux w/WebSphere, Servlet, CGI |
|||
|
|
Member |
haha just my luck that i get to work on a task that you haven't had to work with and it's my first month of being exposed to WF! it's always something. . .
thanks! pt pt WF7.1 XPpro "Trying is the first step towards failure." - Homer J. Simpson |
|||
|
|
Virtuoso |
seems to work OK for me. See below:
SET SUMMARYLINES=NEW DEFINE FILE CAR SECONDS/I8=10832; END TABLE FILE CAR CAR COMPUTE HOURS/I3=INT(SECONDS/3600); NOPRINT COMPUTE MINUTES/I2=INT(SECONDS/60)-(HOURS* 60); NOPRINT COMPUTE REM_SECONDS/I2L=SECONDS - (HOURS*3600) - (MINUTES*60); NOPRINT COMPUTE TOTALTIME/A9=EDIT(HOURS)|':'|EDIT(MINUTES)|':'|EDIT(REM_SECONDS) ; ON TABLE SUMMARIZE SUM. TOTALTIME END Regards, Darin WF Server: 7.1.6 on Z/OS and Linux, ReportCaster, Self-Service, MRE, Java Data: DB2, DB2/UDB, Adabas, SQL Server Output: HTML,PDF,Excel2K WF Client: Linux w/WebSphere, Servlet, CGI |
|||
|
|
Member |
haha i've been frustrated all day and i want to blame it on the computer i'm using because a coworker executes the same file on her machine and it works, but in most cases it's the user so i'll take the blame. i tried, literally, right when you responded and it output the correct info. i figured something like this would be that simple but for some reason it wasn't working properly earlier. thanks for your help, it got this project rolling again!
pt pt WF7.1 XPpro "Trying is the first step towards failure." - Homer J. Simpson |
|||
|
| Previous Topic | Next Topic | powered by eve community |
| Please Wait. Your request is being processed... |
|

