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] Previous Month

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Previous Month
 Login/Join
 
Member
posted
I have a filter which has to display default the previous month in the calender button.
any speicifc code

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


Webfocus7703/Windows7/PDF.HTML
 
Posts: 6 | Registered: March 06, 2012Report This Post
Member
posted Hide Post
any help...


Webfocus7703/Windows7/PDF.HTML
 
Posts: 6 | Registered: March 06, 2012Report This Post
<Kathryn Henning>
posted
Hi windows,

Could you please provide us with some additional information about what you're trying to accomplish? Are you using the HTML Composer or coding this in an editor? What is the code in your filter?

Thanks and regards,

Kathryn
 
Report This Post
Virtuoso
posted Hide Post
Maybe something like this:

-SET &CUR_YYM   = EDIT(&YYMD,'999999$$');
-SET &PRV_YYM   = AYM(&CUR_YYM,-1,'I6YYM');
-SET &RPT_MTHYY = LCWORD(14,CHGDAT('A6YYM','MXYY',&PRV_YYM,'A14'),'A14');
-SET &RPT_MONTH = GETTOK(&RPT_MTHYY,&RPT_MTHYY.LENGTH,1,' ',9,'A9') || ',' ||
-                 (' ' | GETTOK(&RPT_MTHYY,&RPT_MTHYY.LENGTH,2,' ',4,'A4'));
-TYPE &RPT_MONTH


WebFOCUS 7.7.05
 
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007Report This Post
Virtuoso
posted Hide Post
If this is HTML Composer you could try this. Create a fex to populate calendar:
-* File lastmonth.fex
SET HOLDLIST=PRINTONLY
DEFINE FILE SYSCOLUM
INPUT/YYMD=&YYMD;
OUTPUT/YYMD=DATEADD(INPUT, 'M', -1);
END
TABLE FILE SYSCOLUM
PRINT OUTPUT
BY OUTPUT
BY TBNAME NOPRINT
IF READLIMIT EQ 1
ON TABLE PCHOLD FORMAT XML
END

and then add a calendar control.
Use external procedure to link the calendar. Set value and display field as OUTPUT and format as YYMD.


Alan.
WF 7.705/8.007
 
Posts: 1451 | Location: Portugal | Registered: February 07, 2007Report This Post
Expert
posted Hide Post
You could create a variable in DM, sample code below, and use it as the default within the calendar control as "!IBI.AMP.OneMonthAgo;"
-SET &OneMonthAgo = DATECVT(&YYMD,'I8YYMD','YYMD');
-SET &OneMonthAgo = DATEADD(&OneMonthAgo, 'M', -1);
-SET &OneMonthAgo = DATECVT(&OneMonthAgo,'YYMD','A8YYMD');
-TYPE *** Today is &YYMD, one month ago was &OneMonthAgo ***
OK, so I like to reuse variable. This was some code from back in 2007. and it worked then as well as today...

So, why not, There's "(Almost) 1001 Ways To Work With DATES in WebFOCUS"?

BTW: Try this with TESTDATE for different date verifications.
Samples:
*** Today is 20130507, one month ago was 20130407 ***
*** Today is 20130331, one month ago was 20130228 ***
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 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] Previous Month

Copyright © 1996-2020 Information Builders