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 can't seem to find any way to format a date field to be displayed like 25 DEC 08. The only format near this is myDate/DMTY which produces 25 DEC, 08. I know I can redefine and strip out the comma but I would there there is a standard formatting statement. Thanks for the help! EdThis message has been edited. Last edited by: Kerry,
DEFINE FILE CAR
DATE0/A8YYMD = '20081225';
DATE1/DMTY = DATE0;
DATE2/A17 = CHGDAT('YYMD', 'DMTY', DATE0, 'A17');
END
TABLE FILE CAR
SUM
DATE1
DATE2
SALES
BY CAR
END
DATE1 is a normal date reformat which results in "25 DEC, 08". DATE2 uses the "legacy" Date Format Change CHGDAT function and results in "25 DEC 08".
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
DATETRAN appears to have won the prize for most annoying syntax in a function. I can't get it to work. Would you be so kind as to give us an example of how to make this function output the requested date format?
This doesn't work:
DEFINE FILE CAR
DATE0/YYMD = DATECVT('20081225', 'A8YYMD', 'YYMD');
DATE1/A15 = DATETRAN(DATE0, '(MDYY)', '(BT)', 'EN', 15, 'A15');
END
TABLE FILE CAR
SUM
DATE0
DATE1
SALES
BY CAR
END
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
Thank you, but that results in "25-DEC-2008", not what EdG is looking for. He would like "25 DEC 08".
DATETRAN must be a commissioned function - written by a non-IBI programmer, it's the only way to explain why the syntax for this function is completely different than the other date functions. What are those brackets for? And, according to the manual, format option 'T' "Displays month as an abbreviated name with no punctuation, all uppercase." It doesn't state how to output the day and year.
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
TABLE FILE CAR SUM DATE0 DATE1 DATE2 SALES BY CAR END
This returns
CAR DATE0 DATE1 DATE2 SALES
ALFA ROMEO 2008/12/25 25 DEC 08 25 Dec 08 30200
AUDI 2008/12/25 25 DEC 08 25 Dec 08 7800
BMW 2008/12/25 25 DEC 08 25 Dec 08 80390
BTW. the reason for being so weird is that it is the only date function that accomodates NLS for formatting. That doe not explain the need for the ()though.This message has been edited. Last edited by: <JG>,
Using the DMTY format with Legacy dates (I6DMTY) does not include the comma after the month. Simply convert the Smart Date to a Legacy date without the need for subroutines.
DEFINE FILE CAR
DATE0/YYMD='20081225';
DATE1/I6DMTY=DATE0;
END
TABLE FILE CAR
PRINT DATE0 DATE1
BY COUNTRY
END
COUNTRY DATE0 DATE1
------- ----- -----
ENGLAND 2008/12/25 25 DEC 08
FRANCE 2008/12/25 25 DEC 08
ITALY 2008/12/25 25 DEC 08
JAPAN 2008/12/25 25 DEC 08
W GERMANY 2008/12/25 25 DEC 08
intype - Is one of the following character strings indicating the input date components and the order in which you want them to display, enclosed in parentheses and single quotation marks.
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