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] cannot get dashes (/) in date format

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] cannot get dashes (/) in date format
 Login/Join
 
Silver Member
posted
Hello,
For a date field, I am trying to show the dashes (/).
Currently I am getting:
[ Latest Amendment #: 010 ] [ Amendment date: 03302011 ] [ Reason for Amendment: Change Contract ]

I am using the code below:


AMENDDT1/A8MDYY = IF CA_AMEND_REV_DATE NE ' ' THEN DATECVT(CA_AMEND_REV_DATE ,'MDY','A8MDYY') ELSE ' N/A ';

AMEND_DATA/A300 = ' [ Latest Amendment #: ' | CA_AMEND_REV1 ||' ] ' | ' [ Amendment date: ' |AMENDDT1 ||' ] ' | ' [ Reason for Amendment: ' | AMEND_REASON||' ] ';

any suggestions to show the dashes as follows:
[ Latest Amendment #: 010 ] [ Amendment date: 03/30/2011 ] [ Reason for Amendment: Change Contract Clause ]

This message has been edited. Last edited by: Kerry,
 
Posts: 36 | Registered: October 01, 2003Report This Post
Platinum Member
posted Hide Post
paulux99,
One way of doing it would be to use the following logic: Instead of an A8MDYY field use an A10 field like:
COMPUTE AMENDDT1/A10 = IF CA_AMEND_REV_DATE NE ' ' THEN 
EDIT(CA_AMEND_REV_DATE,'99$$$$$$') ||'/'|| EDIT(CA_AMEND_REV_DATE, '$$99$$$$') ||'/'|| EDIT(CA_AMEND_REV_DATE, '$$$$9999')
ELSE ' N/A '; 
  

Using the EDIT will keep this as a 2 digit day, 2 digit month, and a 4 digit year.

Hope this helps


WebFOCUS 7.6.9

Reporting client Windows 2003 Service pack 2 using IIS and TomCat 5.5
Reporting Server OS/400 V5R4M0
Outputs: HTML, Excel, PDF, CSV, and Flat Files
 
Posts: 130 | Location: Columbus, Ohio | Registered: February 25, 2009Report This Post
Master
posted Hide Post
Well, if nothing else works you can do an edit

AMENDDT1/A10 = IF CA_AMEND_REV_DATE NE ' ' THEN EDIT(CA_AMEND_REV_DATE,'99/99/9999') ELSE '';


Pat
WF 7.6.8, AIX, AS400, NT
AS400 FOCUS, AIX FOCUS,
Oracle, DB2, JDE, Lotus Notes
 
Posts: 755 | Location: TX | Registered: September 25, 2007Report This Post
Expert
posted Hide Post
FYI


The reason for lack of slashes is because the format of the field is A8MDYY. With this format the date is stored as an 8 character string, and the slashes are added when the column is shown in a report.

Therefore to add the date to another string with the slashes in place, the slashes will have to be added.


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
Silver Member
posted Hide Post
thanks for all the suggestion. The following seems to work:
DEFINE FILE ...
AMENDDT/A8MDYY = IF CA_AMEND_REV_DATE NE ' ' THEN DATECVT(CA_AMEND_REV_DATE ,'MDY','MDYY')
ELSE ' N/A '
END
TABLE FILE ...
SUM
COMPUTE AMENDDT1/A10 = IF AMENDDT NE ' ' THEN EDIT(AMENDDT,'99/99/9999') ELSE '';
AMENDDT
ON TABLE HOLD
END
DEFINE FILE HOLD
AMEND_DATA/A300 = ' [ Latest Amendment #: ' | CA_AMEND_REV1 ||' ] ' | ' [ Amendment date: ' |AMENDDT1 ||' ] ' | ' [ Reason for Amendment: ' | AMEND_REASON||' ] ';
END
 
Posts: 36 | Registered: October 01, 2003Report This Post
Platinum Member
posted Hide Post
paulux99,
In your DEFINE If the AMENDDT is blank the format of A8MDYY will not like the value of 'N/A' from the ELSE statement. This may throw an error saying the value is incompatible with the format of the field.

A format of A10 will accept a value of 'N/A'.

ERINP


WebFOCUS 7.6.9

Reporting client Windows 2003 Service pack 2 using IIS and TomCat 5.5
Reporting Server OS/400 V5R4M0
Outputs: HTML, Excel, PDF, CSV, and Flat Files
 
Posts: 130 | Location: Columbus, Ohio | Registered: February 25, 2009Report 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] cannot get dashes (/) in date format

Copyright © 1996-2020 Information Builders