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     [CLOSED] Date on the Horizontal Axis of Bar Chart

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Date on the Horizontal Axis of Bar Chart
 Login/Join
 
Platinum Member
posted
I have a date field (defined as an integer) as the value on the X axis of a vertical bar chart. In the GUI of InfoAssist, when I change the format of that date field on the X axis to display it in like 99/99/9999, it removes the date field completely from the X axis.

Has anyone seen this or have any suggestions on how to fix?

This message has been edited. Last edited by: FP Mod Chuck,


WebFOCUS 8.2.06
SQL Server
HTML, PDF, Excel, etc
 
Posts: 168 | Registered: August 22, 2019Report This Post
Virtuoso
posted Hide Post
Could you give us the FORMAT= value of this date field from the master file?


WebFOCUS 8206, Unix, Windows
 
Posts: 1853 | Location: New York City | Registered: December 30, 2015Report This Post
Platinum Member
posted Hide Post
It is I11.


WebFOCUS 8.2.06
SQL Server
HTML, PDF, Excel, etc
 
Posts: 168 | Registered: August 22, 2019Report This Post
Expert
posted Hide Post
quote:
defined as an integer
Why is it "defined as an integer? Integers cannot contain Alpha Characters, such as a "/" (slash).
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
Virtuoso
posted Hide Post
What's the data source? Usually a dbms maintains a real date field. If this is a CSV or Excel, you might want to change the format at the load time to make it represent a real date.


WebFOCUS 8206, Unix, Windows
 
Posts: 1853 | Location: New York City | Registered: December 30, 2015Report This Post
Platinum Member
posted Hide Post
Doug - I was trying to redefine the integer as date within InfoAssist.

BabakNYC - SQL Server is the data source.


WebFOCUS 8.2.06
SQL Server
HTML, PDF, Excel, etc
 
Posts: 168 | Registered: August 22, 2019Report This Post
Virtuoso
posted Hide Post
Not clear to me why you'd do that. Without a very specific use case or more details about what you're trying to do, the answers you'll get will be vague. It's much easier to give advice when you understand the context of the question. Showing code or examples are also helpful.

Here's an example of converting a DATE field to an Integer for instance to get a component of the date.

LASTFMDATE_MONTH/I2= DTPART(LASTFMDATE, MONTH);


WebFOCUS 8206, Unix, Windows
 
Posts: 1853 | Location: New York City | Registered: December 30, 2015Report This Post
Platinum Member
posted Hide Post
Sorry if I'm not clear here. The field is defined as an Integer in the SQL Server data source and it is defined as I11 in the master file. When I use it on the X axis of the bar chart in InfoAssist, I get 20200101 for example. I am trying to display that as 01/01/2020 on the X axis in InfoAssist.

When I go to format the date to display as 01/01/2020 in InfoAssist by selecting MM/DD/YYYY, it removes the date field completely off the horizontal axis. Does this detail make it a little clearer about what I'm trying to do and the behavior in InfoAssist?


WebFOCUS 8.2.06
SQL Server
HTML, PDF, Excel, etc
 
Posts: 168 | Registered: August 22, 2019Report This Post
Platinum Member
posted Hide Post
Babak - Does that make it a little clearer?


WebFOCUS 8.2.06
SQL Server
HTML, PDF, Excel, etc
 
Posts: 168 | Registered: August 22, 2019Report This Post
Master
posted Hide Post
You cannot just change the format of an integer field to a date field. You will need to set a DEFINE and convert the integer to a date.

Example:
  
DEFINE FILE car
SAMPLE_INT_DATE/I11 = '20200101';
NEW_DATE/MDYY = DATECVT(SAMPLE_INT_DATE, 'I8YYMD', 'MDYY');
END

TABLE FILE car
PRINT
    SAMPLE_INT_DATE
    NEW_DATE
BY COUNTRY NOPRINT
WHERE RECORDLIMIT EQ 1
END


Hallway

 
Prod: 8202M1
Test: 8202M4
Repository:
 
OS:
 
Outputs:
 
 
 
 
 
Posts: 608 | Location: Salt Lake City, UT, USA | Registered: November 18, 2015Report This Post
Virtuoso
posted Hide Post
Yes that does make it clear. In my considered opinion, you should talk to the DBA or the owner of this table, and convince them to change this column to a real date. Even though you can manipulate an Integer that has representation of a date, creating real date calculations such as Age, Yesterday, Tomorrow, Previous Year, YTD et cetera becomes a real maintenance nightmare. If this column is a date, I vote you make it a date in the DBMS so you don’t have to compensate for this in DEFINEs and COMPUTES. The alternative to that is to use Hallway’s technique, dump the data into a HOLD file and then you’ll have real date fields to create charts and reports for.


WebFOCUS 8206, Unix, Windows
 
Posts: 1853 | Location: New York City | Registered: December 30, 2015Report This Post
Master
posted Hide Post
quote:
Originally posted by BabakNYC:
Yes that does make it clear. In my considered opinion, you should talk to the DBA or the owner of this table, and convince them to change this column to a real date. Even though you can manipulate an Integer that has representation of a date, creating real date calculations such as Age, Yesterday, Tomorrow, Previous Year, YTD et cetera becomes a real maintenance nightmare. If this column is a date, I vote you make it a date in the DBMS so you don’t have to compensate for this in DEFINEs and COMPUTES. The alternative to that is to use Hallway’s technique, dump the data into a HOLD file and then you’ll have real date fields to create charts and reports for.


Or just create that define in the master file so you don't have to completely mess up the architecture of the database and any other application that might use that field differently.


Hallway

 
Prod: 8202M1
Test: 8202M4
Repository:
 
OS:
 
Outputs:
 
 
 
 
 
Posts: 608 | Location: Salt Lake City, UT, USA | Registered: November 18, 2015Report This Post
Platinum Member
posted Hide Post
Thanks to both of you. I may have to create a DEFINE at the procedure or master file level.


WebFOCUS 8.2.06
SQL Server
HTML, PDF, Excel, etc
 
Posts: 168 | Registered: August 22, 2019Report This Post
Expert
posted Hide Post
What Hallway said, using DATACVT, should work.
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report 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     [CLOSED] Date on the Horizontal Axis of Bar Chart

Copyright © 1996-2020 Information Builders