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     Convert date I8MDYY to A8MDYY

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Convert date I8MDYY to A8MDYY
 Login/Join
 
<Unfocused>
posted
I'm having problems converting a I8MDYY to an A8MDYY. Red Face

I used the following technique to convert a date to an alpha (a blank date field is shown as the basedate 12/31/1900 in Excel with background coloured).

-* CPOST_DT is MDYY type
CTRL_I/I8=CPOST_DT;
CTRL_A/A8MDYY=CPOST_DT;
MM3/A2=EDIT(CTRL_A, '99');
DD3/A2=EDIT(CTRL_A, '$$99');
YYYY3/A4=EDIT(CTRL_A, '$$$$9999');
CTRL_AD/A10=IF CTRL_I EQ 0 THEN ' ' ELSE MM3|'/'|DD3|'/'|YYYY3;

But another date field to convert is I8MDYY and similar code for that type does not work. How can an I8MDYY be converted to an A8MDYY?

Thanks for any illumination.
Smiler
 
Report This Post
Member
posted Hide Post
try

CTRL_I/I8MDYY=CPOST_DT;
CTRL_A/A8MDYY=EDIT(CTRL_I);
 
Posts: 20 | Location: Girona (CAT) | Registered: November 30, 2004Report This Post
<Unfocused>
posted
thanks Joan. But it did not work.
The code
CTRL_I/I8=CPOST_DT;
CTRL_A/A8MDYY=CPOST_DT;
MM3/A2=EDIT(CTRL_A, '99');
DD3/A2=EDIT(CTRL_A, '$$99');
YYYY3/A4=EDIT(CTRL_A, '$$$$9999');
CTRL_AD/A10=IF CTRL_I EQ 0 THEN ' ' ELSE MM3|'/'|DD3|'/'|YYYY3;

works fine with CPOST_DT which is MDYY type.
But using similar code for field PEND_DT (which is I8MDYY type) does not-:

PEND_A/A8MDYY=PEND_DT;
MM4/A2=EDIT(PEND_A '99');
DD4/A2=EDIT(PEND_A,'$$99');
YYYY4/A4=EDIT(PEND_A, '$$$$9999');
PEND_AD/A10=IF PPOST_DT EQ 0 THEN ' ' ELSE MM4|'/'|DD4|'/'|YYYY4;

I want to convert the I8MDYY type to a MDYY type.
 
Report This Post
Platinum Member
posted Hide Post
I got confused on what conversion you are trying to accomplish so I've posted an example with three difference types:

TABLE FILE CAR
PRINT COUNTRY
COMPUTE
-* I8MDYY TO A8MDYY
DTE_I8/I8MDYY = 11092005;
DTE_A8/A8MDYY = EDIT(DTE_I8);
-***************************
-* MDYY TO A8MDYY
DTE_SMART/MDYY = 11082005;
DTE_ALPHA/A8MDYY = DTE_SMART;
-***************************
-* I8MDYY TO MDYY
DTE_INT/I8MDYY = 11072005;
TEMP1/A8MDYY = EDIT(DTE_INT);
DTE_SMRT/MDYY = TEMP1;
-***************************
WHERE RECORDLIMIT EQ 1
END

Does this help?
 
Posts: 118 | Location: DC | Registered: May 13, 2005Report This Post
<Unfocused>
posted
thanks coder for the information, it's very useful.
 
Report This Post
Platinum Member
posted Hide Post
You should consider the book almost 1001 Ways to Work with Dates in WebFOCUS...It will answer your questions on almost every kind of date transformation and date calculation. Comes with CD with all code on it. Check it out.
Regards,
Vivian
Aviter, Inc.
http://www.aviter.com


Vivian Perlmutter
Aviter, Inc.


WebFOCUS Keysheet Rel. 8.0.2
(Almost) 1001 Ways to Work with Dates thru Rel. 8.0.2
Focus since 1982
WebFOCUS since the beginning
Vivian@aviter.com

 
Posts: 191 | Location: Henderson, Nevada | Registered: April 29, 2003Report This Post
Expert
posted Hide Post
If there are "almost 1001 Ways to Work with Dates in WebFOCUS", how many are there, exactly?


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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Expert
posted Hide Post
Big Grin




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Expert
posted Hide Post
I love the cover of the book! Palm trees with .... Dates!!



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report 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     Convert date I8MDYY to A8MDYY

Copyright © 1996-2020 Information Builders