Focal Point Banner


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.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] CYMD date conversion problem

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] CYMD date conversion problem
 Login/Join
 
Member
posted
Trying to convert a CYMD date for the first time from a DB2 table. The date looks like this 1081226.

Tried the following with a blank result and can't seem to stumble onto the Focus equivalent of CYMD.

DATECVT(ACAIDT, 'CYMD', 'YYMD')

Thanks,
Wayne

This message has been edited. Last edited by: Kerry,


7.6.4, iSeries, Windows, DB2
 
Posts: 15 | Registered: June 24, 2008Report This Post
Virtuoso
posted Hide Post
If the CYMD field has an integer (I..) usage in the Synonym file, adding 1900 00 00 will give the yyyymmdd value, and then it's simple to convert to a date field:

-* hold sample data
DEFINE FILE CAR
LIST/I1 WITH COUNTRY = LIST + 1;
CYMD_INT/I8=DECODE LIST(
1 1081226
2 0991231
3 1991231
ELSE 0);
END
TABLE FILE CAR
PRINT CYMD_INT
IF CYMD_INT NE 0
ON TABLE HOLD AS SAMPLE
END

-* transform cymd to yymd:
DEFINE FILE SAMPLE
  
  YYMD_INT/I8YYMD = CYMD_INT + 19000000;
  DATE/YY-M-D = YYMD_INT;

END
TABLE FILE SAMPLE
PRINT CYMD_INT YYMD_INT DATE
END


- Jack Gross
WF through 8.1.05
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] CYMD date conversion problem

Copyright © 1996-2020 Information Builders