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.
As far as I can recall (it was so long ago!) the Y2K issue was that the century was missing, hence a 6 digit date. If you need to insert a zero to make it an 8 digit date, you could do this:
COMPUTE DATE2/A8YYMD =EDIT(DATE1,'90999999');
An example that might work for you:
TABLE FILE CAR
PRINT
COUNTRY
COMPUTE TODAY/YYMD= '&YYMD';
COMPUTE DATE1/A7 = '2040505';
COMPUTE DATE2/A8YYMD =EDIT(DATE1,'90999999');
COMPUTE DATE3/YYMD = DATE2;
COMPUTE DIFF/I4 = DATEDIF(DATE3, TODAY, 'D');
END
DATE1 is your date. The D in the DATEDIF function provides the resulting difference in days. It could be Y for years or M for months.
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
Originally posted by Francis Mariani: 14 November, 2006:
20061114, 14112006, 11142006 is 8. 061114 , 141106 , 111406 is 6.
What's a 7 digit alphanumeric date? Do you mean a Julian Date?
I think you would need to convert to Gregorian before doing anything further with the date:
COMPUTE GREG_DATE/I8 = GREGDT(JULIAN, 'I8');
I have an alphanumeric field that contains a Julian date. I want to convert it to a Gregorian date field. I used this compute, but it does not appear to do the conversion correctly... heres my compute: COMPUTE C_CLDATE2/I8 = GREGDT(QAF0401.QAF0401.A6URAB,'I8');
Before the compute: 106334 After the compute: 1061130
What am I missing?
Prod: WebFOCUS 7.1.6 - on Win 2K3/Tomcat - MRE/BID/RCaster/VisDis and AS400 (JDEWorld)
Posts: 23 | Location: North Carolina | Registered: May 16, 2006
Particularly, "Commonly in computer programming, Julian date has been corrupted to mean the number of elapsed days since the beginning of a particular year. For example, in this usage, the Julian date for the calendar date of 1998-02-28 would be day 59."
Perhaps your dates are stored in some other format?
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
Yes, I did more research and found that the JDE version of the Julian date is 1st digit=century, 2nd/3rd=year, and 4-6 is the day #. As a workaround, I was able to join to a date logical so I can bring in the field as MDY, so now I'm researching to figure out how to make that a date field. When I change the format, it doesn't work, so I'm thinking I need to convert it to a DATE first. Thank you for the feedback...
Prod: WebFOCUS 7.1.6 - on Win 2K3/Tomcat - MRE/BID/RCaster/VisDis and AS400 (JDEWorld)
Posts: 23 | Location: North Carolina | Registered: May 16, 2006