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.
I have a report that lists logged events by date, and I want to restrict it to events of the previous day. The date filter condition is causing me trouble:
Writing it as WHERE LOGDATE GE DATEADD('&YYMD', 'D', -1) works as expected, returning all records that have a log date of yesterday or today. The LOGDATE field is included in the output and I verified that records exist for both dates.
However, when I change it to select yesterday's records only, WHERE LOGDATE EQ DATEADD('&YYMD', 'D', -1) I get an empty report.
The LOGDATE is a date, not a timestamp. The master file describes it as FIELDNAME=LOGDATE, ALIAS=LOGDATE, USAGE=YYMD, ACTUAL=DATE, $
Any ideas why no results are returned when the condition looks for an exact date?This message has been edited. Last edited by: <Emily McAllister>,
Depending on the DBMS the table is in, that date column may actually be a date-time column.
I'd try the following to see if it works:
WHERE LOGDATE GE DATEADD('&YYMD', 'D', -1) AND LOGDATE LT '&YYMD';
Also, I wouldn't embed a WebFOCUS function within a WHERE statement - I believe the function call will either get passed to the DBMS for each row in the table, or cause WebFOCUS to not generate efficient SQL. Try turning SQL traces on to see what happens.
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
Thanks so much Francis, that was it. I cannot see what goes on in the DBMS but restricting the date from both sides worked so LOGDATE must be a datetime column after all.
I would use Dialogue Manager to determine yesterday's date, unfortunately calling DATEADD in Dialogue Manager isn't fun - you have to first convert the string variable &YYMD to a date, then perform the date function, then convert the date back to a string: