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.



Read-Only Read-Only Topic
Go
Search
Notify
Tools
DATE REPORT HEADING
 Login/Join
 
Platinum Member
posted
I am trying to figure out how to add days to the following, I have documentation and looking online and still cannot figure it out. Being new at Web Focus is also not great! Frowner

"FROM <+0>&DATEtrMDYY <+0> TO <+0>&DATEtrMDYY <+0> "  


I want to display something like:

FROM (start date - 8 days) TO (start date - 3 days)

Thanks in advance!


Currenly working @ Learning Circle Education Services
Previously worked @ Nationwide Insurance
Prod: WebFOCUS 7.6.11


Test: WebFOCUS 7.6.11


Dev: WebFOCUS 7.6.11
 
Posts: 125 | Location: Columbus, Ohio | Registered: March 31, 2006Report This Post
Expert
posted Hide Post
With Dialog Manager variables, date manipulation isn't pleasent, here's a solution.

The DATECVT function is used to convert the Dialog Manager variable to Date Format. The # of days is subtracted and the Date Format is converted back to a Dialog Manager variable containing text.

The CHGDAT function converts the YYYYMMDD formatted date (YYMD in FOCUS parlance) to Month DD YYYY format (MXDYY). Then this uppercase Date is converted to Mixed Case.

-SET &ECHO = 'ALL';

-*-- Set up Default Date -----------------------------------
-SET &RUN_DATE = &YYMD;
-*-DEFAULT &RUN_DATE = '&YYMD.EVAL;';

-*-- Set up Date Range -------------------------------------
-SET &FR_DT =
- DATECVT((DATECVT(&RUN_DATE,'I8YYMD','YYMD') - 8), 'YYMD','I8YYMD');
-SET &TO_DT =
- DATECVT((DATECVT(&RUN_DATE,'I8YYMD','YYMD') - 3), 'YYMD','I8YYMD');

-*-- Convert to Friendly Date ------------------------------
-SET &FR_DTY = CHGDAT('YYMD', 'MXDYY', &FR_DT, 'A17');
-SET &TO_DTY = CHGDAT('YYMD', 'MXDYY', &TO_DT, 'A17');

-*-- Convert To Mixed Case ---------------------------------
-SET &FR_DTX = LCWORD(&FR_DTY.LENGTH, &FR_DTY, 'A17');
-SET &TO_DTX = LCWORD(&FR_DTY.LENGTH, &TO_DTY, 'A17');

-TYPE &RUN_DATE
-TYPE &FR_DT / &FR_DTY / &FR_DTX
-TYPE &TO_DT / &TO_DTY / &TO_DTX


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
Platinum Member
posted Hide Post
Thank you very much, that worked and you gave me a good template going forward!!! Smiler


Currenly working @ Learning Circle Education Services
Previously worked @ Nationwide Insurance
Prod: WebFOCUS 7.6.11


Test: WebFOCUS 7.6.11


Dev: WebFOCUS 7.6.11
 
Posts: 125 | Location: Columbus, Ohio | Registered: March 31, 2006Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic


Copyright © 1996-2020 Information Builders