Focal Point
[CLOSED] Using Functions In WebFOCUS InfoAssist To Get Records Past A Particular Date

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/8727045816

April 02, 2012, 01:14 PM
Leye
[CLOSED] Using Functions In WebFOCUS InfoAssist To Get Records Past A Particular Date
Please I am trying to pull records that are older than a set date.

After researching, I discovered that I could use the AYM or DATEADD function in InfoAssist.

But when I use this, I get the message "FOC36355. INVALID TYPE OF ARGUMENT..."

Since I was using the Interactive InfoAssist tool, my code was:

AYM(SYSDATE_DATE, 6, FROM_DATE)

Please how do I rectify this?

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


WebFOCUS 7.6
Windows, All Outputs
April 02, 2012, 01:29 PM
njsden
AYM only works for a Year/Month value (such as 201204), not a full date.

You may need to use AYMD instead, or create a virtual /YYM field first and do AYM on it but I have not used InfoAssist so am not aware of what it does/doesn't allow.



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
April 04, 2012, 01:37 PM
Todd_Wallace
DATEADD is way easier to use in my opinion.
2 Computes
 COMPUTE TDAY/MDYY = '&MDYY';
COMPUTE FROM_DATE/MDYY = DATEADD(TDAY, 'M', -6); 

First on is a MDYY called TDAY and has today's date in it and for the second set a compute up as MDYY as FROM_DATE.
That would get you a date 6 months ago from today(the day the report is run) in MDYY format(10/04/2011).
Then do a
  WHERE <your date field> LE FROM_DATE;



WebFOCUS 8.1.05
Windows-iSeries DB2, All Outputs
HTML