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] (FOC178) THE ADDITION OF TWO OR MORE DATE FIELDS IS INVALID

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] (FOC178) THE ADDITION OF TWO OR MORE DATE FIELDS IS INVALID
 Login/Join
 
Platinum Member
posted
Hi All

When comparing two YYM fields, get the error
(FOC178) THE ADDITION OF TWO OR MORE DATE FIELDS IS INVALID

All I am doing is comparing the two YYM dates in the DEFINE..

Thanks
 
-* Go back 11 months from the date user entered
RPT_TO/MDYY=DATEADD(RPT_DATE, 'M', -11);

-* Tran Date from DB
TRAN_YRMO1/A6=GLRE_ACCT_YEAR | GLRE_ACCT_MTH;
TRAN_YRMO/A6YYM=TRAN_YRMO1;

-* back month at a time
RPT_YRMO11/YYM=DATEADD(RPT_TO, 'M', -1);

-*Sample output
-*TRAN_YRMO RPT_YRMO11 
-*2012/10 2012/01 

DEFINE FILE ...
-* Create Monthly Buckets
-******> error is triggered by this line 
GLRE_LOC1/A6      = IF TRAN_YRMO EQ RPT_YRMO1  THEN GLRE_LOC_ID ELSE ' ';
..
END

 

This message has been edited. Last edited by: <Kathryn Henning>,


Prod/Dev/Test: WF 8.1.5 on (Windows Server 2012 R2 )
SandBox: WebFocus Server 8.1.5 on Windows Server 2008 R2
WebFOCUS App Studio 8.1.5 and Developer Studio 8.1.5 on Windows 7
 
Posts: 134 | Location: USA | Registered: August 21, 2008Report This Post
Expert
posted Hide Post
Where is RPT_YRMO1 computed or defined? I don't see it in the code you posted. If it happens to be RPT_YRMO11, I wouldn't be comparing a YYM column to an A6YYM column (though I haven't tested if this would work).


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
Platinum Member
posted Hide Post
Thanks Francis

I was just giving an example .. I converted A6YYM TO YYM.. though it displays both fields as yyyy/mo dates, but in comparison its different, perhaps internally these are not the same values..

TRAN_YRMO/YYM is a result of direct conversion from a date field.
RPT_YRMO/YYM is a result of DATEADD funtion

I think I will go back to using the Alpha char

How do I convert YYM (2013/01) format to Char (201301)?

Thanks


Prod/Dev/Test: WF 8.1.5 on (Windows Server 2012 R2 )
SandBox: WebFocus Server 8.1.5 on Windows Server 2008 R2
WebFOCUS App Studio 8.1.5 and Developer Studio 8.1.5 on Windows 7
 
Posts: 134 | Location: USA | Registered: August 21, 2008Report This Post
Expert
posted Hide Post
One of many methods:

TABLE FILE CAR
SUM SALES
COMPUTE MY_DATE/YYM = '201410';

COMPUTE MY_DATE_ALPHA1/A6YYM = MY_DATE; NOPRINT
COMPUTE MY_DATE_ALPHA2/A6 = MY_DATE_ALPHA1;
BY COUNTRY
END


It might help if you post your complete code, we could probably trace the dates and see what's going wrong...


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
Platinum Member
posted Hide Post
You can also use DATECVT function.

DEFINE FILE CAR
FIRST_DATE/YYM='201410';
SECOND_DATE/YYM='201412';
FIRST_ALPHA_DATE/A6=DATECVT(FIRST_DATE, 'YYM', 'A6YYM');
SECOND_ALPHA_DATE/A6=DATECVT(SECOND_DATE, 'YYM', 'A6YYM');
END
TABLE FILE CAR
SUM SALES
PRINT
FIRST_DATE
SECOND_DATE
FIRST_ALPHA_DATE
SECOND_ALPHA_DATE
BY COUNTRY
END

Neelima


WebFocus 8104,8204
Excel/PDF/HTML/HTMLTABLE/XML/ALPHA/GIF file/GRAPH/Active technologies
 
Posts: 186 | Location: INDIA | Registered: July 11, 2013Report This Post
Platinum Member
posted Hide Post
Thank You Francis and Neelima.. Problem solved..


Prod/Dev/Test: WF 8.1.5 on (Windows Server 2012 R2 )
SandBox: WebFocus Server 8.1.5 on Windows Server 2008 R2
WebFOCUS App Studio 8.1.5 and Developer Studio 8.1.5 on Windows 7
 
Posts: 134 | Location: USA | Registered: August 21, 2008Report 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] (FOC178) THE ADDITION OF TWO OR MORE DATE FIELDS IS INVALID

Copyright © 1996-2020 Information Builders