I have a 2 time fields tm_fd1 usage=p7 actual=p4 tm_fd2 usage=p13.4 actual=p7
So far I have converted these fields from Packed format to ALPHA via: ADT1/A7 = EDIT(ADM_TIME); ADT2/A8 = EDIT(ADT1,'$99:99:99'); DST1/A13 = EDIT(TIME_OF_DISCHARGE); DST2/A8 = EDIT(DST1, '$$$$$$$99:99:99');
I have determined that I need to use HDIFF to get the diff btwn these times in minutes.
Any ideas on how I could reformat these fields to be used in HDIFF?
Thanks! This message has been edited. Last edited by: Kerry,
Tom, USING FUNCTIONS manual page 246,then 245 you want to change the date to a smartdate first then from a smartdate use HDTTM to make it a datetime (page 246) then use your HDIFF function (page 245) -s
In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
March 13, 2009, 03:36 PM
Tomsweb
So far, I have created a time/date stamp field and tried the hdiff on these new flds.
and buy the book "almost 1001" etc it will help you a lot in calculating with dates and times.
Frank
prod: WF 7.6.10 platform Windows, databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7 test: WF 7.6.10 on the same platform and databases,IE7
March 13, 2009, 04:33 PM
Tomsweb
Thanks Frank,
I did as you suggested, TIME_MINUTES/I8 = HDIFF(XDSH_TM,XADM_TM,'MINUTE','TIME_MINUTES'); and I got this error.
0 ERROR AT OR NEAR LINE 25 IN PROCEDURE ADHOCRQ FOCEXEC * (FOC36355) INVALID TYPE OF ARGUMENT #4 FOR USER FUNCTION HDIFF BYPASSING TO END OF COMMAND 0 ERROR AT OR NEAR LINE 38 IN PROCEDURE ADHOCRQ FOCEXEC * (FOC003) THE FIELDNAME IS NOT RECOGNIZED: TIME_MINUTES BYPASSING TO END OF COMMAND (FOC009) INCOMPLETE REQUEST STATEMENT
I am thinking maybe I need to change XDSH_TM and XADM_TMfrom ALPHA to a different format to make this work. ???