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.
I have a Date in the format of tMY which gives a date in format of Jan, 05 .But i do need it the format of Jan - 05 or Jan 05.Is there a wasy to do this with out using the concatenate option or the CTRAN fucntion which replaces characters.but in both the above options it need to be converted in alpha numeric format.Please suggest if you have any better sokutionThis message has been edited. Last edited by: Kerry,
7.6.4 Unix & Windows Excel,HTML,PDF,PPT,AHTML
Posts: 68 | Location: Hyderabad | Registered: March 18, 2008
I've been playing with this but I haven't been able to find a way to replace "," by "-" other than by using alphanumeric fields; it does not seem to be possible to keep such a value in a DATE field. Well, it is technically possible when using "basic" date components such as Y-M-D but not for cases like "tM". You can for instance have a field as
MYDATE/Y-M-D = &YYMD;
and it'll use dashes as separators.
Is there a specific reason why you want to avoid the use of an alpha field?
If what you need is to keep the value as an actual DATE to be used in other expressions or calculations, you can always keep a DATE field in your report as NOPRINT while using an ALPHA one for display purposes.
Please see example below:
DEFINE FILE CAR
TODAY_DT/YYMD WITH COUNTRY = &YYMD;
REAL_DT/tMY = TODAY_DT;
FMT_DT/A6 = DATETRAN(REAL_DT,'(MY)','(-t)','EN', 6, 'A6');
END
TABLE FILE CAR
PRINT
COUNTRY NOPRINT
TODAY_DT
REAL_DT
FMT_DT
END
REAL_DT is an actual DATE field you can use for whatever DATE manipulations you need. FMT_DT is the formatted value you need although in alpha format.
Depending on the format of the original date, it is possible to output the date in a format you require, using Date-Time formatted columns. Here's an example:
DEFINE FILE CAR
DT1/I8YYMD WITH COUNTRY = 20090324;
DT2/YYMD = DT1;
DT3/HYYMD = HDTTM(DT2,8,'HYYMD');
END
TABLE FILE CAR
PRINT
DT3
DT3/HMtY
END
HMtY outputs as "Mar 09".
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