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] Combining a date and a time

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Combining a date and a time
 Login/Join
 
Member
posted
Hello, I have never done this before, so if i post something weird or incorrectly. Sorry. Could someone please help me join a date to a time in App Studio. The date is in MDYY i.e 06/04/2017 and the time is in HHISsm i.e. 03:39:05:000000. I really would like to get data that is just M/D/YY H:M:Sec i.e. "06/04/2017 03:39:05"

Thank you again and sorry if i posted this in the wrong place.
-Evan

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


8105M Windows
 
Posts: 5 | Registered: May 31, 2017Report This Post
Virtuoso
posted Hide Post
Hi Evan

Welcome to Focal Point, we are glad you are using it. You will find it very helpful for your development questions

In the master file change the ACTUAL and USAGE on the date field to HMDYYS and it should format the way you want it.

Hope this helps,


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
 
Posts: 2127 | Location: Customer Support | Registered: April 12, 2005Report This Post
Platinum Member
posted Hide Post
Can you please try:-
DEFINE FILE CAR
DT/YYMD = '2009/04/14';
TM/A15 = '12.40.41.625652';

DT1/A8YYMD = DT;
TM1/A15 = EDIT(TM,'99$:99$:999999999');
DTTM1/A24 = DT1 | ' ' | TM1;

DTTM2/HYYMDm = HADD(DT(20090414 12:40:41.625652), 'HOUR', 36, 10, 'HYYMDm');

END
TABLE FILE CAR
PRINT
DT
DT1
TM
DTTM1
DTTM2

COUNTRY
END


WebFocus 8104,8204
Excel/PDF/HTML/HTMLTABLE/XML/ALPHA/GIF file/GRAPH/Active technologies
 
Posts: 186 | Location: INDIA | Registered: July 11, 2013Report This Post
Member
posted Hide Post
Thank you both for your replies.
Chuck, sorry but I do not have access to alter the master files. I am just a user.

Neelima,
I tried your code, but when I am in the define, it gives me an error regarding the TM/A15 define. When I plug in my data fields it gives me the following error: (FOC282) RESULT OF EXPRESSION IS NOT COMPATIBLE WITH THE FORMAT OF FIELD: TM

Here is my code for the define
DEFINE FILE A_TRANS_DLY ADD
DT/YYMD=A_TRANS_DLY.DATE_POSTED.DTE;
TM/A15=A_TRANS_DLY.TIME_EFFECTIVE.TIME_VAL;
DT1/A8YYMD=DT;
TM1/A15=EDIT(TM,'99$:99$:999999999');
DTTM1/A24=DT1 | ' ' | TM1;
DTTM2/HYYMDm=HADD(DT(20090414 12:40:41.625652), 'HOUR', 36, 10, 'HYYMDm');
END


8105M Windows
 
Posts: 5 | Registered: May 31, 2017Report This Post
Platinum Member
posted Hide Post
just hide these two fields and give it a try


WebFocus 8104,8204
Excel/PDF/HTML/HTMLTABLE/XML/ALPHA/GIF file/GRAPH/Active technologies
 
Posts: 186 | Location: INDIA | Registered: July 11, 2013Report This Post
Member
posted Hide Post
what do you mean hide? Also, I am getting the error in the define, not in the display of the report. Sorry. I appreciate your help.


8105M Windows
 
Posts: 5 | Registered: May 31, 2017Report This Post
Virtuoso
posted Hide Post
Hi Evan

To hide the field from the report you right mouse click on the field and choose the Visible option to hide. It generates a NOPRINT under the covers.

Please provide the error you are getting on the define.

Thanks


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
 
Posts: 2127 | Location: Customer Support | Registered: April 12, 2005Report This Post
Member
posted Hide Post
Hi Chuck,
Sorry I wasn't clear with my question regarding the hiding. I should have said, "Which two fields? Also I do not understand how setting the two fields to invisible/NOPRINT will avoid the error caused in the define, could you explain that more please?"

The error I am getting in the define is (FOC282) RESULT OF EXPRESSION IS NOT COMPATIBLE WITH THE FORMAT OF FIELD: TM

The field TM is data from a master file in format HHISsm i.e. 03:39:05:000000

Thank you for any help and insight. I appreciate both of your assistance.


8105M Windows
 
Posts: 5 | Registered: May 31, 2017Report This Post
Virtuoso
posted Hide Post
EvanH,

Your error is due to that:
quote:
TM/A15=A_TRANS_DLY.TIME_EFFECTIVE.TIME_VAL;


You cannot copy the value of a HHISsm directly to a A15. There is no automatic conversion for that.

Try the following :
TM/A15=FPRINT(A_TRANS_DLY.TIME_EFFECTIVE.TIME_VAL, 'HHISsm', 'A15');


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Report This Post
Member
posted Hide Post
Hi all,
Thank you for your help! I have figured it out. Below is my code for my define.

DEFINE FILE A_TRANS_DLY ADD
DT/MDYY=A_TRANS_DLY.DATE_POSTED.DTE;
TM/A15=FPRINT(A_TRANS_DLY.TIME_EFFECTIVE.TIME_VAL, 'HHISsm', 'A15');
DT1/MDYY=DT;
TM1/A8=EDIT(TM,'99999999');
DT2/A10=FPRINT(DT1,'MDYY','A10');
DTTM1/A25V=DT2| '' |TM1;
DTTM2/HMDYYS=HINPUT(25, DTTM1, 8, 'HMDYYS');
END


8105M Windows
 
Posts: 5 | Registered: May 31, 2017Report 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] Combining a date and a time

Copyright © 1996-2020 Information Builders