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 am currently trying to compare two user entered dates to a date pulled from the database (HYYMDs format.) Direct comparison gives me an alpha comparison error and the method I'm currently trying snags on the server.
WHERE ( ENTRANCE_DATETIME GE ( HINPUT(14, &txtBDate, 8, 'HYYMDS') ) ); WHERE ( ENTRANCE_DATETIME LE ( HINPUT(14, &txtEDate, 8, 'HYYMDS') ) );
I've tried a few other ways, but all with one of the results above. Any ideas, suggestions, bonks on the head would be much appreciated.
Thanks! -StephanieThis message has been edited. Last edited by: <Maryellen>,
- Stephanie Pierce WF 7.1.4 Win2K
Posts: 15 | Location: Texas | Registered: July 19, 2005
I've not work as much with date-time format, but I believe HINPUT is expect a string of 14 char as first input and you are supplying an 8 character string -- 20050830 (or something like that).
Posts: 118 | Location: DC | Registered: May 13, 2005
I'm also never seen any date function used directly in a WHERE statement -- typically they are coded in an amper variable or define field --my guess is because it can't be parsed correctly.
Posts: 118 | Location: DC | Registered: May 13, 2005
While I haven't used the function directly in a WHERE statement, I think it should work.
Have you tried putting the amper variable in quotes:
WHERE ( ENTRANCE_DATETIME GE ( HINPUT(14, '&txtBDate', 8, 'HYYMDS') ) );
or
WHERE ( ENTRANCE_DATETIME GE ( HINPUT(14, '&txtBDate.EVAL', 8, 'HYYMDS') ) );
As Pam mentioned, you hve to provide a 14 character date-time to HINPUT, something like '20050830010000'. You could code it something like this, (I haven't tested it):
WHERE ( ENTRANCE_DATETIME GE ( HINPUT(14, '&txtBDate.EVAL.000000', 8, 'HYYMDS') ) );
WHERE ( PERIOD_START_DT GE ( HINPUT(14, '&DATE1..000000', 8, 'HYYMDS') ) ); WHERE ( PERIOD_START_DT LE ( HINPUT(14, '&DATE1..000000', 8, 'HYYMDS') ) ); END
I don't know what your date looks like on the way in... I'm presuming this is a timestamp format on your sql database right?
If your incoming date look something like 08-10-2005 (or with slashes), I've been having good luck with:
WHERE ACTUAL_DECISION_DATE GE DT(&FROMDATE). I haven't really seen that doc'd anyplace besides running into it on techsupport. This works for me against sql server 2000.