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.
TABLE FILE MYTABLE PRINT PROJCODE IF PROJDATE EQ '&DATER2' END
..If I use the first &DATER in the GE statement, i get a result, but as soon as I try and do any sort of 'formatting' on the date (and believe me I have tried so many combinations!) I get the message:
(FOC177) INVALID DATE CONSTANT: ******** (FOC009) INCOMPLETE REQUEST STATEMENT BYPASSING TO END OF COMMAND
I have also tried this within a define statement as well as compute.
Any help would be greatly appreciated!
Thanks,
K.
7.6.11 Windows HTML, PDF, Excel etc DevStudio/Webfocus/Focus IBM SQL Server 2000 / 2008 DB2
Posts: 78 | Location: UK | Registered: February 07, 2008
Which date, the Dialogue Manager variable or the data column?
What kind of formatting are you talking about? The line of code is a WHERE statement. If the data column is a SQL DateTime column then you have to set up the WHERE statement differently.
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
By date formatting I mean be able to use the DATEADD function to get the previous month/ or day or year for that matter. if I use the following, my results are fine: IF PROJDATE EQ '&DATER' with this I get all the data from today, but say I want all the data from last month, as in &DATER2, the error occurs. The field is a SQL server datetime field.
Thanks.
K.
7.6.11 Windows HTML, PDF, Excel etc DevStudio/Webfocus/Focus IBM SQL Server 2000 / 2008 DB2
Posts: 78 | Location: UK | Registered: February 07, 2008
The mention of the AYMD function lead me to another post that talks about date convert, I had no idea that this was in fact the issue and what was needed, seems that I need to use DATECVT for all my SQL Server dates, for the date funtions like DATEADD and DATEMOV to work in the first place. This is what I am trying at the moment and it is functioning well (though a little clunky...but does the job): -SET &DATER = &YYMD; -SET &DATER0 = DATECVT(&DATER,'I8YYMD','YYMD'); -SET &DATER1 = DATEMOV(&DATER0, 'BOM'); -SET &DATER2 = DATEADD(&DATER1, 'M', -1); -SET &DATER4 = DATECVT(&DATER2, 'YYMD','I8YYMD');
Thanks for the help!
7.6.11 Windows HTML, PDF, Excel etc DevStudio/Webfocus/Focus IBM SQL Server 2000 / 2008 DB2
Posts: 78 | Location: UK | Registered: February 07, 2008