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]Strange DATE issue

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED]Strange DATE issue
 Login/Join
 
Silver Member
posted
I have this code...

DEFINE FILE PE_HHIORDDP
TAB_LABEL/A20 = IF (FFJQOHH + FFJQOBC) NE 0 THEN '1-BACK IN STOCK' ELSE
IF (FFJQCXP) NE 0 THEN '2-PO SCHEDULED' ELSE '3-OUT OF STOCK';
NEXT_PO_DATE/I9 = IF TAB_LABEL EQ '1-BACK IN STOCK' THEN 0 ELSE FFJDTEQ;
END

TABLE FILE ...
...
BY LOWEST PE_HHIORDDP.PE_FFJITMBP.NEXT_PO_DATE AS 'Next PO Date'
BY LOWEST PE_HHIORDDP.PE_FFJITMBP.TAB_LABEL
...
END

Which gives me these results...

Next PO Date
0
20160525
20160526
20160523
20160517
20160517
20160517
20160520
0
20160428
20160413
20160601
20160520
20160413
20160525
20160517
20160517
20160518

So I change the code to provide the date format MM/DD/YYYY...

DEFINE FILE PE_HHIORDDP
TAB_LABEL/A20 = IF (FFJQOHH + FFJQOBC) NE 0 THEN '1-BACK IN STOCK' ELSE
IF (FFJQCXP) NE 0 THEN '2-PO SCHEDULED' ELSE '3-OUT OF STOCK';
NEXT_PO_DATE/I9 = IF TAB_LABEL EQ '1-BACK IN STOCK' THEN 0 ELSE FFJDTEQ;
OLD_DATE/A8=EDIT(FFJDTEQ,'$$$$$99$$')||EDIT(FFJDTEQ,'$$$$$$$99')||EDIT(FFJDTEQ,'$9999$$$$');
NEW_DATE/A8DMYY=OLD_DATE;
END

TABLE FILE...
...
BY LOWEST PE_HHIORDDP.PE_FFJITMBP.NEW_DATE AS 'Next PO Date'
BY LOWEST PE_HHIORDDP.PE_FFJITMBP.TAB_LABEL
...
END

In which I get these results...

Next PO Date
31/12/1900
31/12/1900
31/12/1900
31/12/1900
31/12/1900
31/12/1900
31/12/1900
31/12/1900
31/12/1900
06/01/2016
31/12/1900
31/12/1900
31/12/1900
31/12/1900
31/12/1900
31/12/1900
31/12/1900
31/12/1900
31/12/1900
05/18/2016

What is going on here? The new code I made worked fine in another procedure. AS you can see a couple of dates came out normal but not the rest.

This message has been edited. Last edited by: <Emily McAllister>,


WebFOCUS 8
Windows, All Outputs
 
Posts: 47 | Registered: February 02, 2016Report This Post
Silver Member
posted Hide Post
I used NEXT_PO_DATE/I8YYMD and it worked in this format other then the YY needs to be at the end.


WebFOCUS 8
Windows, All Outputs
 
Posts: 47 | Registered: February 02, 2016Report This Post
Silver Member
posted Hide Post
Turned out to being a character amount issue. Instead of A8, I used A15 and it worked. Lame...


WebFOCUS 8
Windows, All Outputs
 
Posts: 47 | Registered: February 02, 2016Report This Post
Expert
posted Hide Post
FYI

31/12/1900 is effectively a NULL smart date.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report 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]Strange DATE issue

Copyright © 1996-2020 Information Builders