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] Comparing HYYMDS fields

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Comparing HYYMDS fields
 Login/Join
 
Gold member
posted
I have two date fields on two master files both defined as HYYMDS. Use the dates as parameters works fine. When I try to use one of the dates in a define I get an error.
 IF PAY_DATE LE DUE_DATE THEN POS_ICON ELSE IF PAY_DATE GE DUE_DATE THEN NEG_ICON ELSE NEU_ICON 
The error is cannot compare alphanumeric with numeric. That is true but neither one of them is alphanumeric. Any thoughts?

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


WebFocus 7703
Windows 7
Output format: HTML, Excel, PDF
 
Posts: 54 | Registered: May 07, 2008Report This Post
Expert
posted Hide Post
Can you post the portions of the master with the date fields and POS_ICON and the DEFINE?


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
 
Posts: 2723 | Location: Ann Arbor, MI | Registered: April 05, 2006Report This Post
Gold member
posted Hide Post
 '<img src=/approot/CENTEST/trendPos.gif>' 
This is the define for the POS_ICON. I don't know how to post the master file.


WebFocus 7703
Windows 7
Output format: HTML, Excel, PDF
 
Posts: 54 | Registered: May 07, 2008Report This Post
Expert
posted Hide Post
Open the master up in the text editor and copy and paste the lines with the dates in them.

And post the entire DEFINE statement including all the text from your original post and the field you are setting up to the left of the equal sign, i.e.

DEFFLD/someformat=IF PAY_DATE LE DUE_DATE THEN POS_ICON ELSE IF PAY_DATE GE DUE_DATE THEN NEG_ICON ELSE NEU_ICON;


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
 
Posts: 2723 | Location: Ann Arbor, MI | Registered: April 05, 2006Report This Post
Guru
posted Hide Post
try entering

??F [masterfile name]
-EXIT

to get a list of all fields and their formats in that data source- check both are actually dates, if you don't know how to access the master you can't be sure that they are date formats and this will allow you to see the formats from the fex you are writing...


Developer Studio 7.64
Win XP
Output: mostly HTML, also Excel and PDF

"Never attribute to malice that which can be adequately explained by stupidity." - Heinlein's Razor
 
Posts: 285 | Location: UK | Registered: October 26, 2007Report This Post
Virtuoso
posted Hide Post
Tracie,

Are PAY_DATE and DUE_DATE both defined as HYYMDs?


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

 
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006Report This Post
Master
posted Hide Post
I think you have to use HDIFF and compare to 0 to check wf date time stamp IIRC.

Could be wrong. wf Datetimes are not one of the great features of the product - they should have copied what Oracle did instead they went the function based approach of SQL Server.



Server: WF 7.6.2 ( BID/Rcaster) Platform: W2003Server/IIS6/Tomcat/SQL Server repository Adapters: SQL Server 2000/Oracle 9.2
Desktop: Dev Studio 765/XP/Office 2003 Applications: IFS/Jobscope/Maximo
 
Posts: 888 | Location: Airstrip One | Registered: October 06, 2006Report This Post
Gold member
posted Hide Post
When I hover over both dates on the master files both are defined as HYYMDS. I reformatted them on the report to display as MMDY.
 DUE_DATE/MDYY AS 'Due Date'
     PAY_DATE/MDYY AS 'Date Paid' 
  WHERE ( PAY_DATE GE DT(&Beginpaydate.From Paid Date.) ) AND ( PAY_DATE LE DT(&todatepaid.To Date Paid.) );
This is the error I get trying to run the report.0 ERROR AT OR NEAR LINE 29 IN PROCEDURE customer_invoice_r
(FOC282) RESULT OF EXPRESSION IS NOT COMPATIBLE WITH THE FORMAT OF FIELD:
PAY_DATE
(FOC009) INCOMPLETE REQUEST STATEMENT
BYPASSING TO END OF COMMAND


WebFocus 7703
Windows 7
Output format: HTML, Excel, PDF
 
Posts: 54 | Registered: May 07, 2008Report This Post
Platinum Member
posted Hide Post
try reformatting pay_date hyymds to yymd.
PAY_DATE1/YYMD = HDATE(PAY_DATE, 'YYMD');


WF 8 version 8.2.04. Windows.
In focus since 1990.
 
Posts: 189 | Location: pgh pa | Registered: October 06, 2004Report This Post
Gold member
posted Hide Post
quote:
try reformatting pay_date hyymds to yymd.
PAY_DATE1/YYMD = HDATE(PAY_DATE, 'YYMD');


This worked. This one is solved. Thanks to all.


WebFocus 7703
Windows 7
Output format: HTML, Excel, PDF
 
Posts: 54 | Registered: May 07, 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] Comparing HYYMDS fields

Copyright © 1996-2020 Information Builders