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] Issue with retrieving records from 2 days prior

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Issue with retrieving records from 2 days prior
 Login/Join
 
Member
posted
Hi, I am trying to create a report that filters records that were created from the past two days but the filter has to be dynamic so it can be run on any day.

I have tried the following:
DEFINE FILE CREATEDATE
CURRENTDATE/HYYMD=HGETC(8 ,CURRENTDATE );
DATEDIFF/HYYMD=HADD (CURRENTDATE,'year',-2, 8,'HYYMD');
END

--with--

WHERE CREATEDDATE GE DATEDIFF;

but when I switch out 'year' to 'day' it does not work. It does not give me an error but just keeps loading.

I am running WF 8201M. Any feedback would be appreciated. Thanks!

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


WebFOCUS 8201M
Windows, All Outputs
 
Posts: 2 | Registered: June 29, 2017Report This Post
Virtuoso
posted Hide Post
Try with this instead
-* SET TEST DATE AS 2 DAYS AGO FROM CURRENT DATE
-SET &TWO_D_AGO = AYMD(&YYMD, -2, 'YYMD');

TABLE FILE CREATEDATE
...
WHERE CURRENTDATE GE &TWO_D_AGO;
END


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Report This Post
Virtuoso
posted Hide Post
Hi Dwonlee

First of all welcome to Focal Point. This forum is a great place to get help with development questions from a lot of very knowledgeable customers and IBI staff.

The date you need to be comparing to needs to be in the database table your are reporting against. Your example makes this a little confusing as it appears you are DEFINING a field to be CURRENTDATE. What you are trying to do is possible against a real date field.

Put this code at the beginning of your procedure.


-SET &TWODAYSPRIOR = AYMD(&YYMD,-2,I8YYMD);


Then your WHERE statement should be.


WHERE COMPAREDATE GE &TWODAYSPRIOR


COMPAREDATE should be the date field stored in the database table you are reporting against.

Hope this helps


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
 
Posts: 2127 | Location: Customer Support | Registered: April 12, 2005Report This Post
Virtuoso
posted Hide Post
Didn't see Martin's reply but we both have the same solution which is good...


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
 
Posts: 2127 | Location: Customer Support | Registered: April 12, 2005Report This Post
Member
posted Hide Post
Martin and Chuck,

I appreciate the warm welcome Smiler

Thanks for your quick reply! Your solution works for me and it was definitely a more efficient solution to my report.


WebFOCUS 8201M
Windows, All Outputs
 
Posts: 2 | Registered: June 29, 2017Report 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] Issue with retrieving records from 2 days prior

Copyright © 1996-2020 Information Builders