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] convert time from ms to seconds

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] convert time from ms to seconds
 Login/Join
 
Master
posted
I have a report with a time field as
USAGE=P13.4, ACTUAL=P7, in the master file description.

When I create a report with that field, it displays as: 142100.0000

Any ideas on how to convert this field to diaplay in report as HH:MM:SS?

Thanks,
Tomsweb Winky

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


Tomsweb
WebFOCUS 8.1.05M, 8.2.x
APP Studio, Developer Studio, InfoAssist, Dashboards, charts & reports
Apache Tomcat/8.0.36
 
Posts: 573 | Location: Baltimore, MD | Registered: July 06, 2006Report This Post
Virtuoso
posted Hide Post
Something like this maybe?
SET CDN=OFF

APP APPENDPATH IBISAMP

EX -lines 4 EDAPUT MASTER,FPTEST,CV,FILE,
FILENAME=FPTEST, SUFFIX=FIX, $
  SEGMENT=FPTEST, $
    FIELDNAME=TIMEFLD, USAGE=P13.4, ACTUAL=A13, $

EX -lines 3 EDAPUT FOCTEMP,FPTEST,CV,FILE,
142100.0000
151309.3674

-RUN
FILEDEF FPTEST DISK fptest.ftm (LRECL 15 RECFM V

DEFINE FILE FPTEST
TFLD/A8=EDIT(FTOA(TIMEFLD, '(D6)', 'A7'),'99:9$9:99');
END

TABLE FILE FPTEST
PRINT * TFLD
END
Hope this helps....


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
 
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007Report This Post
Silver Member
posted Hide Post
quote:
Originally posted by Tomsweb:
I have a report with a time field as
USAGE=P13.4, ACTUAL=P7, in the master file description.

When I create a report with that field, it displays as: 142100.0000

Any ideas on how to convert this field to diaplay in report as HH:MM:SS?

Thanks,
Tomsweb Winky


Try this
Haven't tried myself
but the first field converts F to A and takes only first 6 chars, gets rid of decimal points.
NEWTIME/A6=FTOA(YOUR_TIMEFIELD, '(P13.4)', NEWTIME);
FMTTIME/A8 = EDIT(NEWTIME,'99:99:99');


-Yogesh Patel
------------------------------------------------------------------------
PROD: WF 764 on Linux Apache tomcat v5.5
DEV: WF 768 on Linux
 
Posts: 42 | Location: Edison, New Jersey | Registered: January 30, 2007Report This Post
Guru
posted Hide Post
To convert a PACKED field to alpha, PTOA will work better.


jimster06
DevStu WF 7.6.11
W7
HTML, PDF, EXL2K
 
Posts: 252 | Location: USA | Registered: April 15, 2003Report 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] convert time from ms to seconds

Copyright © 1996-2020 Information Builders