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]Format comma, keeping dashes in date

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED]Format comma, keeping dashes in date
 Login/Join
 
Platinum Member
posted
I tried searching the documentation for this but couldn't find anything. I have output in which some of the columns are start and end dates. I formatted them YY-M-D. When output is to html the dashes remain. When I switch output to format comma for a csv file, it gets rid of the dashes in my file. Why is this and how do I keep it from doing this?

malinda

This message has been edited. Last edited by: Malinda,


WebFOCUS 7.6.11
Windows
all output (Excel, HTML, PDF)
 
Posts: 149 | Registered: April 15, 2010Report This Post
Virtuoso
posted Hide Post
This is from the IBI site...may shed some light on your situation.

Smart Date fields will only store the numeric part of the date with no
formatting. When the date shows up in a styled report (HTML/PDF), the dates
is printed with formatting. Since a data hold file (CSV/ALPHA) is a data file
and not a formatted output, you are seeing just the 20090903 value.

There is a function called DATETRAN which will convert a smart date to an
alpha translation of the date. See this example:

DEFINE FILE CAR
RUN_DATE/MDYY=&MDYY;
DATE2/A10=DATETRAN(RUN_DATE, '(MDYY)', '(-)', 'EN', 10, DATE2)
END
TABLE FILE CAR
PRINT RUN_DATE DATE2
BY COUNTRY
ON TABLE HOLD AS CSVDATE FORMAT COM
END

This will convert the smart date RUN_DATE to a translated alpha date that
uses dashes for the delimitter.

If this is run and the output file is viewed with a text editor (like notepad),
the dashes will be seen. If the CSV file is opened using Excel, however,
Excel will apply it's own formatting for the date field.


In Focus since 1993. WebFOCUS 7.7.03 Win 2003
 
Posts: 1903 | Location: San Antonio | Registered: February 28, 2005Report This Post
Virtuoso
posted Hide Post
Date separators seem to be stripped out when sent to a COMM/COMMT file. Try creating your own formatted "date" as an alpha field with all the pieces you need. It requires more work, I know, but it may be the way to go unless there is some setting out there of which I'm not aware.



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
Virtuoso
posted Hide Post
Oh, Prarie just beat me Cool ! Malinda, Prarie's example clearly explains and shows the fact that you need to make your date an alpha field and then you'll have full control.



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
Platinum Member
posted Hide Post
Perfect, I was thinking the alpha was they way I was gonna have to go but was hoping for an easier way. Oh well thanks for the help everyone!


WebFOCUS 7.6.11
Windows
all output (Excel, HTML, PDF)
 
Posts: 149 | Registered: April 15, 2010Report 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]Format comma, keeping dashes in date

Copyright © 1996-2020 Information Builders