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     [SOLVED] EOM gives wrong date (giving 03/01 instead of 02/28)

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] EOM gives wrong date (giving 03/01 instead of 02/28)
 Login/Join
 
Gold member
posted
Hi All,

I am using the BOM and EOM functions to calculate dates which are used as input parameters for my reports.

However for Feb 2015, the EOM is shown as 20150301 (March 1).
I do not understand why the system is not giving the right EOM.

Is it something to do with next year being leap year.
If so, how do I fix it?

The code is:
-SET &RUNDATEINT = DAMDY(&MDYY, 'I8');

-SET &BOMRUNDATE = DATEMOV(&RUNDATEINT, 'BOM');
-SET &STARTDATE = DTYMD(&BOMRUNDATE, 'I8YYMD');

-SET &EOMRUNDATE = DATEMOV(&RUNDATEINT, 'EOM');
-SET &ENDDATE = DTYMD(&EOMRUNDATE, 'I8YYMD');

Thanks for reading.

This message has been edited. Last edited by: <Kathryn Henning>,


WebFOCUS 7.7.02Windows
Output Formats: Excel, HTML, PDF
 
Posts: 82 | Registered: February 23, 2011Report This Post
Expert
posted Hide Post
sumant, you cannot use the date functions without first converting the date string to a date.

1) Convert the string to a date with DATECVT
2) Apply the date function
3) Convert the date back to a string with DATECVT

-SET &BOMRUNDATE = DATECVT((DATEMOV((DATECVT(&RUNDATEINT,'I8YYMD','YYMD')),'EOM')),'YYMD','I8YYMD');


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
Gold member
posted Hide Post
Thanks a lot Francis for the help.


WebFOCUS 7.7.02Windows
Output Formats: Excel, HTML, PDF
 
Posts: 82 | Registered: February 23, 2011Report 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     [SOLVED] EOM gives wrong date (giving 03/01 instead of 02/28)

Copyright © 1996-2020 Information Builders