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.
I am using 'DayOfWeek/I1=HPART(SHIFTDATE, 'WEEKDAY', 'I1'); ' to return the day number 1 for Sunday, 2 for Monday and so on. But to force the system to use Monday as the first day of the week, in one fo my reports I did the following: SET WEEKFIRST=2. My report is still showing 1 for saturday 2 for Monady and so on.
Is this the usage of WEEKFIRST?.
Thanks
WebFocus 7.6.5 AND WebLogic server as web server sql2005 as database server
Posts: 273 | Location: Europe | Registered: May 31, 2007
the HPART function seems to have a problem here's a reported problem and if you look at this thread, there's some discussion today about another problem with the same function; i couldn't get WEEKFIRST to have any effect on it, either.
In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003
I apologize for the day in response but I have been out of the office. I reviewed this thread and the WEEKFIRST setting will not have an effect on the WEEKDAY component in the HPART subroutine. The WEEKFIRST setting is meant to impact the WEEK component. I briefly reviewed the other thread mentioned and that thread is using the WEEK component in conjunction with the WEEKFIRST setting. Ed Wolfgram provided a great deal of useful information and there is the known issue that you pointed to as well. Let me take a look at that other thread in detail and I will update that thread sometime tomorrow.
If you are getting 1 for Sunday and want 1 to be Monday, as a work around you could do a decode to change it. DayofWeek1/I2=DECODE DayOfWeek( 1 7 2 1 3 2 4 3 5 4 6 5 7 6);
Pat WF 7.6.8, AIX, AS400, NT AS400 FOCUS, AIX FOCUS, Oracle, DB2, JDE, Lotus Notes
Posts: 755 | Location: TX | Registered: September 25, 2007
I ran the code in the CAR app, and it gave me today's date as Tuesday,Feb 11, when in fact it's Thursday, Feb 13. Then I rejigged it to reference one of my own application and it gave me Thursday.
I found something weird with the fancy-schmancy DATETRAN function.
I ignored the comment in the doc that to get the Day of Week, the input date must have only W (Day of Week) format because I thought it was a ridiculous requirement. Of course I get the wrong Day of Week. So you have to transform a YYMD date to W and then use that to get the Day of Week in alpha format, but you can't use DATETRAN to get the Day of Week in numeric format.
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server