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.



Read-Only Read-Only Topic
Go
Search
Notify
Tools
Date formatting
 Login/Join
 
Master
posted
I have a fex that is returning the following error:

(FOC36346) INCORRECT USE OF DATE-TIME FIELD OR CONSTANT


Here's my fex...
-SET &Y6MO = DATECVT((DATEADD((DATECVT(&YYMD,'I8YYMD','YYMD')), 'D', -183)), 'YYMD','HYYMDI');
TABLE FILE JOBDATA
SUM
CNT.DST.BIDID AS 'COUNT,DISTINCT,BIDID'
BY CLIENTID
WHERE BIDOUT GE &Y6MO;


Here's an excerpt from the jobdata master file.
FIELDNAME=BIDOUT, ALIAS=bidout, USAGE=HYYMDI, ACTUAL=HYYMDI,
MISSING=ON, $

I figured a DATECVT to HYYMDI would make it compatible with the BIDOUT field of the same type.

Any ideas?


Prod: Single Windows 2008 Server running Webfocus 7.7.03 Reporting server Web server IIS6/Tomcat, AS400 DB2 database.
 
Posts: 611 | Registered: January 04, 2007Report This Post
Guru
posted Hide Post
The following comes to mind:

....date-time literals in the form DT (date-time literal).

eg WHERE TRANSDATE GT DT(2000/01/01 02:57:25)

This may help.


jimster06
DevStu WF 7.6.11
W7
HTML, PDF, EXL2K
 
Posts: 252 | Location: USA | Registered: April 15, 2003Report This Post
Expert
posted Hide Post
If you -TYPE your &Y6MO variable, you will see that it is not a datetime stamp. If you just need the time to be zeroes, you can set up the amper variable so that it is just a date and then concatenate the time to it and use the second variable in your WHERE clause.

Something like this:
-SET &Y6MO = AYMD(&YYMD,-183,'I8YYMD');
-TYPE &Y6MO
-SET &Y6MODT=&Y6MO | ' 00:00:00.0000';
-TYPE &Y6MODT


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
 
Posts: 2723 | Location: Ann Arbor, MI | Registered: April 05, 2006Report This Post
Virtuoso
posted Hide Post
You may probably want to use a combination of the techniques provided by both jimster06 and GinnyJakes. I just did and it help me to solve a query problem I was having when trying to retrieve information from Oracle table:

-* Any date to be processed
-DEFAULT &MYSTARTDT=20080701;

-* Go 6 months back (or something like that) and set value as date/time
-SET &MYSTARTDTTM=EDIT(DATECVT(DATEADD(DATECVT(&MYSTARTDT,'I8YYMD','YYMD'), 'D', -183), 'YYMD','A8YYM'), '9999/99/99') | ' 00:00:00';
-TYPE &MYSTARTDTTM

-* Retrieve from DB
TABLE FILE ...
PRINT ...
WHERE DTTM_IN_TABLE GE DT(&VACTSTARTDT);
END



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.
 
Posts: 1533 | Registered: August 12, 2005Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic


Copyright © 1996-2020 Information Builders