Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Counting number of employess taking time off during business hours

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Counting number of employess taking time off during business hours
 Login/Join
 
Member
posted
I am still learning WEBFOUCS and all the wonder that is holds. However, I have been stuck on this problem for about a week now. I need to count the number of employess taking time off by 15 minute increments (7am to 7pm). I have the start time and end time for each employee.

I have created a similiar report with VB code using arrays and functions but I see that you can't do that in WF reporting.

Does anyone have any suggestions or examples?


version 7.7.03, windows 7, microsoft office 2007
 
Posts: 13 | Location: Minnesota | Registered: October 03, 2012Report This Post
Expert
posted Hide Post
Can you supply some sample data ?


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Member
posted Hide Post
Sample Data would look like this:

Date Start_Time End_Time
11/19/2012
2012/11/19 09:30:00.000
2012/11/19 12:45:00.000

The date and time format can be converted to just about any expresion I want.


version 7.7.03, windows 7, microsoft office 2007
 
Posts: 13 | Location: Minnesota | Registered: October 03, 2012Report This Post
Expert
posted Hide Post
Firstly, welcome to the forum. I am sure that you will find much more than you ever thought that you would need to know! There is a reasonable search facility on this forum that will assist you in answering many of the questions that you may have - if you need to know then chances are that someone else has the same or similar need and may have asked it before. You just need to be selective in your search criteria - just like with any other search engine!!

There was a posting a few days ago that will help you with the differences between two date time fields - check out HDIFF function. If you combine that knowledge with WRITE CNT.EMPLOYEES, you might be halfway to your solution.

Good luck

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Member
posted Hide Post
Thank you for the response and introduction. I have spend several hours / days (I've lost count) on here for something similar. I have found several posts that helped me quite a bit. I am very thankfull to all the contributers on here.

I have finally created what I was looking for. I don't know if it the most effiencient way but it works Smiler

Here it is (shorten up a bit to fit)

TABLE FILE SCHEDULE
PRINT
DATE
AGENT_ID
AGENT_NAME
START_MINUTE AS 'EXC_START_MIN'
LENGTH AS 'EXC_LENGTH_MIN'
ON TABLE HOLD AS SCH FORMAT FOCUS

DEFINE FILE SCH
-*SCH_DTE TO EQUAL DATE
SCH_DTE/MDYY=DATE;
-*PLACE HOLDERS FOR HOURS AND MINS
INP_HRS/I2=00;
INP_MIN/I2=00;
-*CREATE DATE WITH HOURS AND MINS (MM/DD/YYYY 00:00)
DATE_TIME/HMDYYS=HDTTM(SCH_DTE,8,'HMDYYI');
DATE_TIME/HMDYYI=HSETPT(DATE_TIME,'HOUR',INP_HRS,8,'HMDYYI');
DATE_TIME/HMDYYI=HSETPT(DATE_TIME,'MINUTE',INP_MIN,8,'HMDYY');
-*START TIME IS MINUTES FROM MIDNIGHT AND LENGTH IS TOTAL MINUTES
EX_START/I3=EXC_START_MIN;
EX_LENGH/I3=EXC_LENGTH_MIN;
-*ADD MINUTES TO DATE_TIME PLACEHOLDER FOR FULL FORMAT OF START AND END
EXCEPTION_START/HYYMDs=HADD(DATE_TIME, 'MINUTE', EX_START, 8, 'HHI');
EXCEPTION_END/HYYMDs=HADD(EXCEPTION_START, 'MINUTE', EX_LENGH, 8, 'HHI');
-*CONVERT TIME TO INTERGERS
ISTART/I4 = (HPART(EXCEPTION_START, 'HOUR', 'I2')*100) + HPART(EXCEPTION_START, 'MINUTE', 'I2');
IEND/I4 = (HPART(EXCEPTION_END, 'HOUR', 'I2')*100) + HPART(EXCEPTION_END, 'MINUTE', 'I2');
-*COUNTING 1 IF START AND END IS BETWEEN TIMES
I700/I2 = IF 700 GE ISTART AND IEND GT 700 THEN 1 ELSE 0;
I715/I2 = IF 715 GE ISTART AND IEND GT 715 THEN 1 ELSE 0;
-*and so on
END

TABLE FILE SCH
PRINT
NAME
EXCEPTION_START
EXCEPTION_END
ISTART
IEND
I700
I715
-*and so on...
BY SCH_DTE
ON TABLE HOLD AS SCH_FILTER FORMAT FOCUS
END
TABLE FILE SCH_FILTER
SUM
I700 AS '7:00'
I715 AS '7:15'
-* and so on...
BY SCH_DTE AS 'DATE'
END


version 7.7.03, windows 7, microsoft office 2007
 
Posts: 13 | Location: Minnesota | Registered: October 03, 2012Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Counting number of employess taking time off during business hours

Copyright © 1996-2020 Information Builders