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     [Closed]Get Last Business Day of the Month

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[Closed]Get Last Business Day of the Month
 Login/Join
 
Master
posted
I am trying to get the last business day of the month.

For example,

January 2013 - Last business day is 31st

September 2012 - Last business day is 28.

I am using DATEMOV(DATE,'EOM') to go to the last day but not able to get the last business day.

I don't want to do by moving to the 1st of next month and do DATEADD(DATE,'BD',-1).


Appreciate your help.

Thanks

This message has been edited. Last edited by: Kamesh,


WFConsultant

WF 8105M on Win7/Tomcat
 
Posts: 780 | Location: Florida | Registered: January 09, 2005Report This Post
Virtuoso
posted Hide Post
Once you have the last calendar day of the month, how can you tell whether it's a Business day?

As far as I know, only solution is to move forward from EOM one BD, then back one BD. If EOM is a BD, you'll be back where you started; if not, you'll have found the last BD.


- Jack Gross
WF through 8.1.05
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
Expert
posted Hide Post
I can do it in three moves:

DEFINE FILE CAR
DATE1/YYMD WITH COUNTRY = '20130115';
END

TABLE FILE CAR
PRINT
DATE1
COMPUTE DATE1_MP1/YYMD = DATEADD(DATE1, 'M', 1);
COMPUTE DATE1_MP1BOM/YYMD = DATEMOV(DATE1_MP1, 'BOM');
COMPUTE DATE1_LBD/YYMD = DATEMOV(DATE1_MP1BOM, 'PBD');

WHERE RECORDLIMIT EQ 1
END


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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Virtuoso
posted Hide Post
 SET BUSDAY = _MTWTF_
 
DEFINE FILE CAR
TODAY/MDYY=  '&DATEMDYY';  
LAST_BUSDAY/MDYY=DATEADD(DATEMOV(TODAY,'EOM') + 1,'BD',-1 );
END
 
TABLE FILE CAR
PRINT COUNTRY TODAY LAST_BUSDAY
WHERE RECORDLIMIT EQ 1
END 
 
Posts: 1903 | Location: San Antonio | Registered: February 28, 2005Report This Post
Master
posted Hide Post
I tried both Francis and Prarie code in my Developer Studio and didn't see the Last Business Day value. It shows blank.


WFConsultant

WF 8105M on Win7/Tomcat
 
Posts: 780 | Location: Florida | Registered: January 09, 2005Report This Post
Master
posted Hide Post
Make sure you have an HDAYs file present in your environment.

http://forums.informationbuild...1057331/m/3407081316

quote:
Originally posted by Kamesh:
I tried both Francis and Prarie code in my Developer Studio and didn't see the Last Business Day value. It shows blank.


------------------------------------
WF Environment:
------------------------------------
Server/Client, ReportCaster, Dev Studio: 7.6.11
Resource Analyzer, Resource Governor, Library, Maintain, InfoAssist
OS: Windows Server 2003
Application/Web Server: Tomcat 5.5.25
Java: JDK 1.6.0_03
Authentication: LDAP, MRREALM Driver
Output: PDF, EXL2K, HTM

------------------------------------
Databases:
------------------------------------
Oracle 10g
DB2 (AS/400)
MSSQL Server 2005
Access/FoxPro
 
Posts: 561 | Registered: February 03, 2010Report This Post
Master
posted Hide Post
Already verified it. I do have that file.


WFConsultant

WF 8105M on Win7/Tomcat
 
Posts: 780 | Location: Florida | Registered: January 09, 2005Report This Post
Master
posted Hide Post
Prairie/Francis,

It is working fine. Thanks for your help.


WFConsultant

WF 8105M on Win7/Tomcat
 
Posts: 780 | Location: Florida | Registered: January 09, 2005Report 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     [Closed]Get Last Business Day of the Month

Copyright © 1996-2020 Information Builders