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. -EvanThis message has been edited. Last edited by: FP Mod Chuck,
8105M Windows
June 07, 2017, 02:25 PM
FP Mod Chuck
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
June 07, 2017, 02:29 PM
Neelima
Can you please try:- DEFINE FILE CAR DT/YYMD = '2009/04/14'; TM/A15 = '12.40.41.625652';
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
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
June 08, 2017, 09:24 AM
FP Mod Chuck
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
June 08, 2017, 10:55 AM
EvanH
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
June 08, 2017, 11:07 AM
MartinY
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.