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.
Iam using sql passthrough and later Iam trying to read the amper variables and one among those amper variable is a date field which looks something like this: &date=2011001
I need to extract only the year part from this date amper variable and I was not successful in getting this done using either the Edit nor other date functions.
Any help on how to do this would be much appreciated!
Thanks a lot in advance!
Regards!This message has been edited. Last edited by: info4pal,
There are multiple options available. Since it is from DB, default column format will be in date. So either use DB functions to extract year from date and then read it in WebFOCUS or you can use WF functions to convert Date format to alpha and then read into amper variable.
I prefer DB conversion as it is simple and straight forward . Thanks, Ram
-SET &DATE_YYMD=20141225;
-SET &DATE_YY=&DATE_YYMD/10000;
-TYPE DATE_YY - &DATE_YY
-EXIT
TABLE FILE CAR
SUM
COMPUTE DATE_YYMD/D20.2=20141225; NOPRINT
COMPUTE DATE_YY/I4=DATE_YYMD/10000;
BY HIGHEST 1 COUNTRY NOPRINT
ON TABLE HOLD FORMAT ALPHA
ON TABLE SET HOLDLIST PRINTONLY
END
-RUN
?FF HOLD
-READ HOLD &DATE_YY.A4.
-TYPE DATE_YY - &DATE_YY