IB - Developer Center    Forums  Hop To Forum Categories  FOCUS/WebFOCUS    [SOLVED] Comparing HYYMDS fields
Go
New
Search
Notify
Tools
Reply
  
-star Rating Rate It!  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 7.6.4
Windows
Output format: HTML, Excel, PDF
 
Posts: 52 | Registered: May 07, 2008Reply With QuoteEdit or Delete MessageReport This Post
Virtuoso
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.6.5 with 7.6.6 WFRS; AIX 5.2; WebSphere 6.1.0.15
Dev: WF 7.6.5 with 7.6.6 WFRS; AIX 5.3; WebSphere 6.1.0.15
Primarily self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable
 
Posts: 1534 | Location: BNSF: Fort Worth, TX | Registered: April 05, 2006Reply With QuoteEdit or Delete MessageReport 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 7.6.4
Windows
Output format: HTML, Excel, PDF
 
Posts: 52 | Registered: May 07, 2008Reply With QuoteEdit or Delete MessageReport This Post
Virtuoso
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.6.5 with 7.6.6 WFRS; AIX 5.2; WebSphere 6.1.0.15
Dev: WF 7.6.5 with 7.6.6 WFRS; AIX 5.3; WebSphere 6.1.0.15
Primarily self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable
 
Posts: 1534 | Location: BNSF: Fort Worth, TX | Registered: April 05, 2006Reply With QuoteEdit or Delete MessageReport This Post
Platinum Member
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: 212 | Location: UK | Registered: October 26, 2007Reply With QuoteEdit or Delete MessageReport This Post
Master
Posted Hide Post
Tracie,

Are PAY_DATE and DUE_DATE both defined as HYYMDs?


Daniel
wf 7.6/WinXP/IIS/SSA
www.wrapapp.com
www.srl.co.il

 
Posts: 594 | Location: Tel Aviv, Israel | Registered: March 23, 2006Reply With QuoteEdit or Delete MessageReport 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: 848 | Location: Airstrip One | Registered: October 06, 2006Reply With QuoteEdit or Delete MessageReport 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 7.6.4
Windows
Output format: HTML, Excel, PDF
 
Posts: 52 | Registered: May 07, 2008Reply With QuoteEdit or Delete MessageReport This Post
Platinum Member
Posted Hide Post
try reformatting pay_date hyymds to yymd.
PAY_DATE1/YYMD = HDATE(PAY_DATE, 'YYMD');


prod:7.1.2/win2k3/ss/rpt caster/dev studio 7.6.4 win xp
 
Posts: 130 | Location: pgh pa | Registered: October 06, 2004Reply With QuoteEdit or Delete MessageReport 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 7.6.4
Windows
Output format: HTML, Excel, PDF
 
Posts: 52 | Registered: May 07, 2008Reply With QuoteEdit or Delete MessageReport This Post
 Previous Topic | Next Topic powered by eve community  
 

IB - Developer Center    Forums  Hop To Forum Categories  FOCUS/WebFOCUS    [SOLVED] Comparing HYYMDS fields

Copyright © 1996-2008 Information Builders, leaders in enterprise business intelligence.