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.
Are you trying to change the format of the Calendar selection or the format of the field it populates? I don't think you can change the display format of the Calendar date picker. But if you're trying to change the format of the variable you're populating for display in the report, then you can use a DEFINE to make it display YYMD.
WebFOCUS 8206, Unix, Windows
Posts: 1853 | Location: New York City | Registered: December 30, 2015
BabaNYC, I'm actually trying to take the date I get from the Calendar (eg April 13, 2018) and subtract 90 days from it. So I'm trying to change the format of the variable so I can do the DATEADD. Can you give me an example of the DEFINE on the variable?
Which brings us back to Chaudhary's question. What's the format of the date field you're populating with this variable? So, for instance, if you have a WHERE MYDATE EQ &DATE_VAR then you need to tell us what the format of the field MYDATE is. If you're not sure, you can hover over it in InfoAssist and it'll give you a popup with the format. The calculations will be performed on that field not the &DATE_VAR.
WebFOCUS 8206, Unix, Windows
Posts: 1853 | Location: New York City | Registered: December 30, 2015
I see that you already have this taken care of. However, if you'd like my 2¢ then you can look at what I would do to create new variables in an I8YYMD format:
-DEFAULTH &DATE_CONVT='';
-DEFAULTH &DATE_90AGO='';
DEFINE FILE CAR
DATE_BEGIN/A17='&DATE_START.(|FORMAT=YYMD).From Date.';
DATE_CONVT/YYMD=HINPUT(17, DATE_BEGIN, 20, 'HYYMD');
DATE_90AGO/YYMD=DATEADD(DATE_CONVT, 'D', -90);
END
TABLE FILE CAR
SUM DATE_CONVT DATE_90AGO
BY CAR NOPRINT
WHERE CAR EQ 'AUDI';
ON TABLE HOLD AS NEWAMPERS FORMAT BINARY
END
-RUN
-READFILE NEWAMPERS
-TYPE &|DATE_START [&DATE_START.TYPE&DATE_START.LENGTH] = &DATE_START
-TYPE &|DATE_CONVT [&DATE_CONVT.TYPE&DATE_CONVT.LENGTH] = &DATE_CONVT
-TYPE &|DATE_90AGO [&DATE_90AGO.TYPE&DATE_90AGO.LENGTH] = &DATE_90AGO
When selecting today's date I get the following output:
0 NUMBER OF RECORDS IN TABLE= 1 LINES= 1
&DATE_START [A13] = April 20 2018
&DATE_CONVT [N08] = 20180420
&DATE_90AGO [N08] = 20180120
From what I understand (please if someone knows differently, I'm all ears), amper variables can only store alpha or numeric data. So you cannot use an actual date format in a variable and do date calculations in the dialog manager.This message has been edited. Last edited by: Hallway,
Hallway
Prod: 8202M1
Test: 8202M4
Repository:
OS:
Outputs:
Posts: 608 | Location: Salt Lake City, UT, USA | Registered: November 18, 2015