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.



Read-Only Read-Only Topic
Go
Search
Notify
Tools
COMT and HCNVRT
 Login/Join
 
Platinum Member
posted
I am converting a date to be alpha. In excel, html, pdf it works great. When I put it to COMT, it chops off most of the date and just displays the minutes and seconds. I can't seem to figure out how to get the date to appear as a date. Any suggestions? Here is the code:

TABLE FILE LOGON
PRINT
USERID
COMPUTE LAD/A30 = HCNVRT(LASTACCESSDATE,'(HYYMDm)',30,LAD);
AS 'LAST ACCESS DATE'


ON TABLE HOLD AS OUTFILE FORMAT COMT
END


webfocus 8.105M; os: windows; pdf, html, exl2k, csv
 
Posts: 179 | Registered: November 10, 2004Report This Post
Expert
posted Hide Post
With this fex:
FILEDEF OUTFILE DISK C:\TEMP\OUTFILE.CSV
DEFINE FILE CAR
LASTACCESSDATE/HYYMDs= HINPUT(14,'20060428211535',8,'HYYMDs');
END
TABLE FILE CAR
PRINT
SALES
LASTACCESSDATE
COMPUTE LAD/A30 = HCNVRT(LASTACCESSDATE,'(HYYMD)',30,LAD);
AS 'LAST ACCESS DATE'

ON TABLE HOLD AS OUTFILE FORMAT COMT
END


I get this:
"SALES","LASTACCESSDATE","LAST ACCESS DATE"
0,"20060428211535000","2006/04/28"
12000,"20060428211535000","2006/04/28"

This opens correctly in Excel.

This message has been edited. Last edited by: Francis Mariani,


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Platinum Member
posted Hide Post
I found that the data is fine if opened in ultra-edit, notepad and MS access. It only appears funny if they open it in excel. I ran the sample given and the same happens to the data for me on my desktop. We're on excel2003, so I'm thinking it's excel. I don't believe this is an issue since they can open it in access and notepad and the date looks correct there. My default editor for csv is excel so that's what I was seeing last week.


webfocus 8.105M; os: windows; pdf, html, exl2k, csv
 
Posts: 179 | Registered: November 10, 2004Report This Post
Expert
posted Hide Post
Pam,

What does it look like? I'm sure you know the hash situation regarding column width etc. but if you could tell us what it appears like then we might be able to highlight your problem.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Platinum Member
posted Hide Post
The format should be 2006/10/31 08:58:13.943000
What is showing up in exl is 58:13.9.
If I save it to csv and open the csv file in ultra-edit, it shows as "2003/05/06 12:15:38.610000". If I open that same saved csv file to microsoft office excel, it only gives me the minutes, seconds and part of the milliseconds. If I open that csv and convert to an access database, the date/time stamp appears correct.


webfocus 8.105M; os: windows; pdf, html, exl2k, csv
 
Posts: 179 | Registered: November 10, 2004Report This Post
Expert
posted Hide Post
Pam,

That is most wierd. I am using Excel 2003 (ver 11.6560.6568 SP2) at present and the output I get from Francis' example is 2.00604E+16 displayed but the underlying value is 2006042811535000 for LASTACCESSDATE. The value for just the date portion is too narrow to view without expanding the column width where upon it displays correctly.

I can only agree with you that it would appear to be Excel related but possibly due to settings - although I am at a loss as to what settings as there does not seem to be any that are relevent to this type of display behaviour. Frowner

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Platinum Member
posted Hide Post
A coworker just noticed something. Excel is bringing the datetimestamp in as mins and second format. Even though that is not a format listed in excel, if you right click on the column and change the format to date and select a date format with date, minutes and seconds, it DOES display correctly. I tried this yesterday and I must have read the field wrong because I thought it was making the minutes to be the month, but the actual values are displaying correctly if we change it to a date format. So, in summary, excel is defaulting the format to be mins & seconds. Thanks again for everyone's help.


webfocus 8.105M; os: windows; pdf, html, exl2k, csv
 
Posts: 179 | Registered: November 10, 2004Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic


Copyright © 1996-2020 Information Builders