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 TopicGo
Search
Notify
Admin
New PM!
Platinum Member posted February 15, 2010 04:02 PM
Is this possible? I cannot get the NEWDATE12 to be the actual TITLE.
DEFINE FILE ACTFORMS
CURDATE/YYMD=&YYMD;
NEWDATE12/YYM=DATEADD(CURDATE,'M',-12);
END
TABLE FILE ACTFORMS
PRINT
ORDERS_MINUS12 AS '
BY FORM# END Thanks WEBFOCUS 7.6.8
This message has been edited. Last edited by: Kerry , February 22, 2010 01:03 PM 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, 2006
IP
Expert To get the value of NEWDATE12 to be in the title, you will need to have an extra step to save the value, and -READ it into a &var.
e.g.
TABLE FILE ACTFORMS
SUM MAX.NEWDATE12
ON TABLE SAVE AS MY_DATE
END
-RUN
-READ MY_DATE &DateVar.A6.
Then use the variable in the title.
ORDERS_MINUS12 AS '&DateVar BY FORM#'
Also when you post code, use the
[CODE] [/code] tag, so the post does not get screwed up.
Waz... Prod: WebFOCUS 7.6.10/8.1.04 Upgrade: WebFOCUS 8.2.07 OS: Linux Outputs: HTML, PDF, Excel, PPT In Focus since 1984 Pity the lost knowledge of an old programmer!
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006
IP
Ignored post by
Waz
posted
February 15, 2010 04:20 PM Show Post
Virtuoso Hi neuro, if your date is entirely dependent on your system's current date you may also try calculating NEWDATE12 as follows:
-SET &NEWDATE12 = DATECVT(DATEADD(DATECVT(&YYMD, 'I8YYMD', 'YYMD'), 'M', -12), 'YYMD', 'A8YYMD');
TABLE FILE ACTFORMS
PRINT
ORDERS_MINUS12 AS '&NEWDATE12'
BY FORM#
END
What both Waz's suggestion and this one tell you is that you cannot embed a data field value inside of a TITLE the same way you do it in a HEADING, SUBHEAD, etc. The way to do it is by using dialog manager &variables which can be either data-driven (Waz's approach) or, in simple cases, environment-based. Just pick the one that makes the most sense to your case.
Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2Test: Dev. Studio 8008 /Windows 7 (Local) Output: HTML, EXL2K.
Platinum Member Okay, I think have it. Except I am trying to get a friendly format and have the following which is not working:
-SET &NEWDATE12 = CHGDAT('I8YYMD', 'MXYY',DATECVT(DATEADD(DATECVT(&YYMD, 'I8YYMD', 'YYMD'), 'M', -12),'YYMD','I8YYMD'), 'A17');
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, 2006
IP
Expert Try in two steps:
-SET &DT1A = DATECVT(DATEADD(DATECVT(&YYMD, 'I8YYMD', 'YYMD'), 'M', -12),'YYMD','A8YYMD');
-SET &NEWDATE12 = CHGDAT('YYMD', 'MXYY', &DT1A, 'A17');
-TYPE &DT1A
-TYPE &NEWDATE12 DATECVT and DATEADD are "Standard Date and Time Functions", while CHGDAT is a "Legacy Date Function".
Others may post slightly different methods...
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, 2005
IP
Virtuoso quote:
-SET &NEWDATE12 = DATECVT(DATEADD(DATECVT(&YYMD, 'I8YYMD', 'YYMD'), 'M', -12), 'YYMD', 'A8YYMD');
neuro, by leaving the expression exactly as I provided you with originally it should be easy to wrap it with CHGDAT to obtain the value you expect:
-SET &NEWDATE12 = CHGDAT('YYMD', 'MXYY', DATECVT(DATEADD(DATECVT(&YYMD, 'I8YYMD', 'YYMD'), 'M', -12),'YYMD','A8YYMD'), 'A17');
Gives you:
FEBRUARY 2009 The key there is to use
A8YYMD as the output format in the outer DATECVT function and
YYMD as the input format to CHGDAT.
Regards,
- Neftali.
Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2Test: Dev. Studio 8008 /Windows 7 (Local) Output: HTML, EXL2K.
Virtuoso Another alternative:
-SET &CURMTH = EDIT(&DATEYYM,'9999$99');
-SET &NEWDATE = AYM(&CURMTH,-12,'I6');
-SET &OUTDATE = CHGDAT('YYM','MXYY',&NEWDATE,'A17');
This message has been edited. Last edited by: Dan Satchell , February 16, 2010 03:39 PM WebFOCUS 7.7.05
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007
IP
Expert There are a host of Date variables, one of them may help.
-TYPE &|DATE : &DATE
-TYPE &|DATED : &DATED
-TYPE &|DATEDMtrYY : &DATEDMtrYY
-TYPE &|DATEDMY : &DATEDMY
-TYPE &|DATEDMYY : &DATEDMYY
-TYPE &|DATEDwMtrYY : &DATEDwMtrYY
-TYPE &|DATEJ : &DATEJ
-TYPE &|DATEJUL : &DATEJUL
-TYPE &|DATEM : &DATEM
-TYPE &|DATEMDwtYY : &DATEMDwtYY
-TYPE &|DATEMDWtrY : &DATEMDWtrY
-TYPE &|DATEMDY : &DATEMDY
-TYPE &|DATEMDYY : &DATEMDYY
-TYPE &|DATEMt : &DATEMt
-TYPE &|DATEMT : &DATEMT
-TYPE &|DATEMtDwY : &DATEMtDwY
-TYPE &|DATEMtrDYY : &DATEMtrDYY
-TYPE &|DATEMtrDwtYY : &DATEMtrDwtYY
-TYPE &|DATEMTDWTRYY : &DATEMTDWTRYY
-TYPE &|DATEMtr : &DATEMtr
-TYPE &|DATEMTr : &DATEMTr
-TYPE &|DATEMTR : &DATEMTR
-TYPE &|DATEMTRDwY : &DATEMTRDwY
-TYPE &|DATEMTRDY : &DATEMTRDY
-TYPE &|DATEMTY : &DATEMTY
-TYPE &|DATEMTrYY : &DATEMTrYY
-TYPE &|DATEMY : &DATEMY
-TYPE &|DATEMYY : &DATEMYY
-TYPE &|DATEQ : &DATEQ
-TYPE &|DATEQY : &DATEQY
-TYPE &|DATEQYY : &DATEQYY
-TYPE &|DATEW : &DATEW
-TYPE &|DATEwJ : &DATEwJ
-TYPE &|DATEWJ : &DATEWJ
-TYPE &|DATEWt : &DATEWt
-TYPE &|DATEWT : &DATEWT
-TYPE &|DATEWtr : &DATEWtr
-TYPE &|DATEWTr : &DATEWTr
-TYPE &|DATEWTR : &DATEWTR
-TYPE &|DATEY : &DATEY
-TYPE &|DATEYBMBD : &DATEYBMBD
-TYPE &|DATEYM : &DATEYM
-TYPE &|DATEYMDWT : &DATEYMDWT
-TYPE &|DATEYQ : &DATEYQ
-TYPE &|DATEYY : &DATEYY
-TYPE &|DATEYYQ : &DATEYYQ
-TYPE &|DATEYMD : &DATEYMD
-TYPE &|DATEYYJ : &DATEYYJ
-TYPE &|DATEYYJUL : &DATEYYJUL
-TYPE &|DATEYYM : &DATEYYM
-TYPE &|DATEYYMD : &DATEYYMD
-TYPE &|DATEYYMDW : &DATEYYMDW
-TYPE &|DATEYYMtrD : &DATEYYMtrD
-TYPE &|DATEYYMtrDW : &DATEYYMtrDW
For example:
&DATEMTrYY gives you FEBRUARY, 2010
Waz... Prod: WebFOCUS 7.6.10/8.1.04 Upgrade: WebFOCUS 8.2.07 OS: Linux Outputs: HTML, PDF, Excel, PPT In Focus since 1984 Pity the lost knowledge of an old programmer!
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006
IP
Ignored post by
Waz
posted
February 16, 2010 04:31 PM Show Post
Platinum Member Thank you that worked!
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, 2006
IP
Virtuoso quote:
There are a host of Date variables, one of them may help
Waz, that list of variables is great and useful. I'll make sure I'll bookmark it for future reference!
Thanks,
Neftali.
Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2Test: Dev. Studio 8008 /Windows 7 (Local) Output: HTML, EXL2K.
Virtuoso yes for me too....
Frank prod: WF 7.6.10 platform Windows, databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7 test: WF 7.6.10 on the same platform and databases,IE7
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006
IP
Platinum Member Waz, which one of these formats will return this exact format: Sep-10
7.7.02 Windows EXCEL, PDF, CSV, TEXT
Virtuoso That date representation is a custom one, easily created out of one of the standards:
-SET &MYDATE = EDIT(&DATEMtDwY,'999$-$$$99');
-TYPE &MYDATE
GamP
- Using AS 8.2.01 on Windows 10 - IE11. in Focus since 1988
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007
IP
Platinum Member Thanks GamP. works great. Looks like I'm going to have to cough up the 25 bucks and buy that date format book.
7.7.02 Windows EXCEL, PDF, CSV, TEXT
Virtuoso As Frank already said, that book costs only 25 $ is is worth every one of them.
GamP
- Using AS 8.2.01 on Windows 10 - IE11. in Focus since 1988
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007
IP
Please Wait. Your request is being processed...
Read-Only TopicCopyright © 1996-2020 Information Builders