FM to find time difference

Hi Experts,
Is there any function module to find time difference between two given time.
Thanks
RR

try using this 1.
SD_CALC_DURATION_FROM_DATETIME

Similar Messages

  • Function module to find time difference

    Can any body help me to find the function module to find the time diff: between two times, time is in 24hrs

    Hi again,
    1. Difference is always returned in SECONDS.
    2. use this code (just copy paste in new program)
    REPORT abc.
    data : t1 type sy-uzeit.
    data : t2 type sy-uzeit.
    DATA : DIFF TYPE I.
    t1 = '090000'.
    t2 = '100000'.
    DIFF = T2 - T1.
    WRITE :/ DIFF.
    regards,
    amit m.

  • Find the Difference in time for creation of two activities for the same SR

    Hi
    I need to find the difference in time of cretaion of two different activities for an SR. Is there any function which I can use to get the same
    For e.g.
    SR # |Activity Created Date |Duration
    123 12-nov
    123 13 nov 1 day
    Thanks in advance
    Meena

    There's a TIMESTAMPDIFF function.
    An example from the book Oracle CRM On Demand Reporting has the following example...
    TIMESTAMPDIFF( SQL_TSI_MINUTE, Activity."Start Time", Activity."End Time" )
    which would return the difference in minutes.
    As I type this, I'm thinking you probably know this and your problem is how to get the Activity start time for the next activity into this function. I sorry can't think of any way to do that.

  • How to find out time difference between 2 consecutive characters coming in

    Hi
    Data is coming on serial port and m taking this data in a input stream.I need to know the time difdference between consecutive characters.Any ideas?

    What do you mean? If you meassure the time between two characters, you want to calculate how accurate it is? First you would need to find out how accurate the System.currentTimeMillis is on the platform you run on. That may be easy
    long start = System.currentTimeMillis();
    long end;
    while ((end = System.currentTimeMills()) == start);
    long delta = end - start;But sometimes (on win98) it reports 50, other times 60. So its not quite accurate. But you could redo that test a couple of times and take the avg or the max.
    Then if you get a time difference of 0ms between two characters, you know it will be somewhere 0 and 60ms. If you get 60ms between two characters, you know it will be somewhere between 0 and 120 ms. It's +/- delta seconds accurate.
    Would this be a way to calculate the percentage accuracy: 100.0-100.0*delta/(time+delta)
    Still better to meassure the time over more than just 2 characters unless it is a very slow stream.

  • I want to find the difference(duration) between logon and logoff time?

    i want to find the difference(duration) between logon and logoff time of below table?
    can any one tell the query to find using self join?
    USR     LOGON_TIME     LOGOFF_TIME
    HR     31-AUG-04 03.04.04.000000 AM     -
    HR     - 31-AUG-04 03.04.14.000000 AM
    Edited by: 794244 on Nov 1, 2010 10:47 PM

    No selfjoin, just analytical functions.
    CREATE TABLe log_time
    (username varchar(20),
    LOGON_TIME timestamp,
    LOGOFF_TIME timestamp);
    insert into  log_time (username,LOGON_TIME,LOGOFF_TIME) values ('HR',sysdate,null);
    insert into  log_time (username,LOGON_TIME,LOGOFF_TIME) values ('HR',null,sysdate+1/38);
    insert into  log_time (username,LOGON_TIME,LOGOFF_TIME) values ('HR',sysdate+2,null);
    insert into  log_time (username,LOGON_TIME,LOGOFF_TIME) values ('HR',null,sysdate+2+14/20);
    commit;
    SELECT username,logon_time,logoff_time, my_logoff_time, my_logoff_time -logon_time,
           time_to_sort
    FROM (
            SELECT username,logon_time, logoff_time,
                   LEAD(logoff_time,1,logon_time) OVER (PARTITION BY username ORDER BY time_to_sort) my_logoff_time,
                   time_to_sort
            FROM (SELECT username,logon_time,logoff_time,NVL(logon_time,logoff_time) time_to_sort
                  FROM log_time)
    where LOGON_TIME is not null     
    ORDER BY  time_to_sort; 
    USERNAME     LOGON_TIME     LOGOFF_TIME     MY_LOGOFF_TIME     MY_LOGOFF_TIME-LOGON_TIME     TIME_TO_SORT
    HR     02.11.10 11:34:56.000000000          02.11.10 12:12:50.000000000     0 0:37:54.0     02.11.10 11:34:56.000000000
    HR     04.11.10 11:34:56.000000000          05.11.10 04:22:56.000000000     0 16:48:0.0     04.11.10 11:34:56.000000000But, if that code which fills that table should better UPDATE than INSERT. You can cover much more issues. (e.g the DB crashes and you get 2 logon but no logoff in a sequence and.....)
    -- andy

  • Extract Time from date and Time and Need XLMOD Funtion to find the Difference between Two Time.

    X6 = "1/5/15 5:16 AM" & NOW ....................difference by Only Time
    not date
    X6 date and Time will be changing, Its not Constant
                Dim myDateTime As DateTime = X6
                Dim myDate As String = myDateTime.ToString("dd/MM/yy")
                Dim myTime As String = myDateTime.ToString("hh:mm tt")
                Dim myDateTime1 As DateTime = Now
                Dim myDate1 As String = myDateTime1.ToString("dd/MM/yy")
                Dim myTime1 As String = myDateTime1.ToString("hh:mm tt")
    Need to use this function to find the Difference between Two Time. due to 12:00 AM isuue
    Function XLMod(a, b)
        ' This replicates the Excel MOD function
        XLMod = a - b * Int(a / b)
    End Function
    Output Required
     dim dd  = XLMod(myTime - myTime1)
    Problem is myTime & myTime1 is String Need to convert them into Time, Later use XLMOD Funtion.

    Induhar,
    As an addendum to this, I thought I'd add this in also: If you have two valid DateTime objects you might consider using a class which I put together a few years ago
    shown on a page of my website here.
    To use it, just instantiate with two DateTime objects (order doesn't matter, it'll figure it out) and you'll then have access to the public properties. For this example, I'm just showing the .ToString method:
    Option Strict On
    Option Explicit On
    Option Infer Off
    Public Class Form1
    Private Sub Form1_Load(ByVal sender As System.Object, _
    ByVal e As System.EventArgs) _
    Handles MyBase.Load
    Dim date1 As DateTime = Now
    Dim date2 As DateTime = #1/1/1970 2:35:00 PM#
    Dim howOld As New Age(date1, date2)
    MessageBox.Show(howOld.ToString, "Age")
    Stop
    End Sub
    End Class
    I hope that helps, if not now then maybe at some point in the future. :)
    Still lost in code, just at a little higher level.
      Thanx frank, can use this in Future....

  • Function Module to find the Difference between two times.

    Hi All,
    Wud you plz let me know the Function Module to find the Difference between two times.
    Input Time1( Hours:Minutes) Time2 ( Hours:Minutes)
    Need Output in Hours:Minutes only . ( No seconds Needed )
    Ex :
    Input :
           06:00 to 18:00 Output : 12:00
    and  20:00 to 06:00 Output: 10:00 with +ve sign only. No -ve sign.
    Thanks,
    N.L.Narayana

    check this .
    data : p_timel like sy-uzeit,
           p_timeh like sy-uzeit,
           diff like sy-uzeit,
           di(8) type c .
           p_timel = '200000'.
           p_timeh = '060000'.
           diff = p_timeh - p_timel.
           concatenate diff+0(2) ':' diff+2(2) into di.
           write:/ di.
    also check for this.
           p_timel = '060000'.
           p_timeh = '180000'.
    see if this can be implemented in ur code .
    or else  u can try with  Fm L_TO_TIME_DIFF passing startdate enddate starttime endtime with UOM as MIN
    hope this helps regards,
    vijay

  • Help I need to subtract times to find the difference between two times?

    Hello there, I really need help.
    I'm trying to make this attendance tracking system so that when a user enters his or her ID the system wll remember his/her check in time. However I also need to find out either how late the person is or how early to store their over time and late.
    So I get the time by using a timestamp, so I'm left with a timestamp that I store into the db. But the problem comes when trying to compute for the late or over time. To do that I have to get the normal login/checkin time from the employee schedules table in the db and either subtract that time from the checkInTime to compute for how late or subtract the checkIn time from it to find early.
    The thing is, the schedule is stored in datetime format in the db since the db is sql. Also I have no idea on how to subtract the two dates via java. The month, date and year stored in the sql db are just fillers, all I need computed is the time difference of the hours and minutes between the checkInTime and the schedule.
    I've tried to use datediff: SELECT e.employeeNumber, datediff('hh', startTime, checkInTime) as lateTime from employeeschedules e, timandattendance, contractualemployees c where c.scheduleNumber=e.scheduleNumber and t.employeeNumber=c.employeeNumber and t.checkInNumber=1;
    But it keeps on giving out various errors: You have an error in your sql syntax check your manual that corresponds to your sql server version. for the right syntax to use near , checkInTime) as lateTime from employeeschedules e, timandattendance, contractualemployees c where c.scheduleNumber=e.scheduleNumber and t.employeeNumber=c.employeeNumber and t.checkInNumber=1;
    My sql server is My SQL 5.0.5
    Now I'm thinking of useing Gregorian instead, but I don't know how to use Gregorian and dont know the various methods. Can someone tell me what to do, provide some sample codes and references that I can use to accomplish what I need to do?

    NewtonsApple_2 wrote:
    Now I'm thinking of useing Gregorian instead, but I don't know how to use Gregorian and dont know the various methods. Can someone tell me what to do, provide some sample codes and references that I can use to accomplish what I need to do?it may help...
    GregorianCalendar

  • How to find the difference between 2 time values in Java

    hi all,
    i have 2 time values
    String time1="6:20";
    String time2="21:30"
    How to find the difference between 2 times in Java?
    pls help
    thanx in advance....

    Calculating Java dates: Take the time to learn how to create and use dates
    Working in Java time: Learn the basics of calculating elapsed time in Java
    Formatting a Date Using a Custom Format
    Parsing a Date Using a Custom Format

  • How to find the time difference..?

    HI
    How to find the time difference between two times
    for Example
    the difference between '24/10/2005 8:25:00 PM' and '25/10/2005 5:20:00 AM'
    is 8.55
    Kris

    This is a procedure taht do the job
    CREATE OR REPLACE FUNCTION Diff_Time
         LD$Date_Deb IN DATE DEFAULT SYSDATE
         ,LD$Date_Fin IN DATE DEFAULT SYSDATE
         ,LN$JJ       OUT PLS_INTEGER
         ,LN$HH       OUT PLS_INTEGER
         ,LN$MI       OUT PLS_INTEGER
         ,LN$SS       OUT PLS_INTEGER
      ) RETURN NUMBER
    IS
      dif   NUMBER ;
    BEGIN
      IF LD$Date_Fin < LD$Date_Deb THEN
         RETURN ( -1 ) ;
      END IF ;
      SELECT  LD$Date_Fin - LD$Date_Deb INTO dif  FROM dual ;
      SELECT  TRUNC ( LD$Date_Fin - LD$Date_Deb)  INTO LN$JJ  FROM dual ;
      SELECT  TRUNC ( (LD$Date_Fin - LD$Date_Deb) * 24) -  ( LN$JJ * 24 ) INTO LN$HH FROM dual ;
      SELECT  TRUNC ( (LD$Date_Fin - LD$Date_Deb) * 1440) - ( (LN$HH * 60) + ( LN$JJ * 1440) ) INTO LN$MI FROM dual ;
      SELECT  TRUNC ( (LD$Date_Fin - LD$Date_Deb) * 86400) - ( (LN$MI * 60) + (LN$HH * 3600) + ( LN$JJ * 3600 * 24 ) ) INTO LN$SS FROM dual ;
      RETURN( dif ) ;
    END ;
    /You may have to modify it to fit your own requirement.
    Francois

  • How to find the date and time difference in InfoPath 2013?

    Hi All,
    My date and time format is like: 2013-12-24T10:47:38 and have three fields Start date, End date and Actual time taken.
    If start date and end date filled then actual time taken field should automatically should fill, for example 2 days 12 hours 48 min 3 sec.
    How to achieve this?

    Hi Sam,
     I believe we had discussed the same issue in the below thread. Can you please refer the below one?
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/d93e16ff-c123-4b36-b60b-60ccd34f6ca7/calculate-time-differences-in-infopath?forum=sharepointcustomizationprevious
    If it's not helping you please let us know
    Sekar - Our life is short, so help others to grow
    Whenever you see a reply and if you think is helpful, click "Vote As Helpful"! And whenever
    you see a reply being an answer to the question of the thread, click "Mark As Answer

  • How to calculate the % of time difference between different state

    Hi there,
    The below query returns the follwoign outptut. I need to calculate the % of time period that a specific state ( state ex: open or closed or all report )exists.
    I have to find the time difference between the 2 states . How could I do that ?
    The first row shows null for the previous state . How could get actual previous state for the first row?
      SELECT si.station_name,
                    vppstation.avi_control_state_code.STATE_SHORT_NAME,
                    ash.state_id ,
                    lag(ash.state_id) over (order by ash.STATE_EFF_DATE desc) previous_state,
                    TO_NUMBER(TO_CHAR(ash.state_eff_date, 'SSSSS')) "periods in sec",
                    TO_CHAR(ash.state_eff_date, 'dd-mon-yyyy hh24:mi:ss am') "Date"
               from vppstation.avi_state_history ash
    left outer join vppstation.avi_control_state_code
                 on ash.state_id = vppstation.avi_control_state_code.state_id
    LEFT OUTER JOIN vpproadside.stations_installed si  
                 ON ash.station_id = si.station_id               
              where ash.state_eff_date >= to_date('28/02/2010', 'dd/mm/yyyy')
                and ash.state_eff_date <= to_date('03/03/2010', 'dd/mm/yyyy') ;
           group by si.station_name
                         ash.state_id
           order by ash.state_eff_date asc ;
    STATION_NAME                   STATE_SHORT_NAME STATE_ID               PREVIOUS_STATE         periods in sec         Date                   
    IRDNCST02                      Open             1                    NULL                  85166                  01-mar-2010 23:39:26 pm
    IRDNCST02                      All Report       3                      1                      85159                  01-mar-2010 23:39:19 pm
    IRDNCMT01                      Closed           2                      3                      81376                  01-mar-2010 22:36:16 pm
    IRDNCST02                      Open             1                      2                      78723                  01-mar-2010 21:52:03 pm
    IRDNCST02                      All Report       3                      1                      76023                  01-mar-2010 21:07:03 pm
    IRDNCMT01                      Open             1                      3                      55922                  01-mar-2010 15:32:02 pm
    IRDNCMT01                      Closed           2                      1                      54931                  01-mar-2010 15:15:31 pm
    IRDNCHA01                      Closed           2                      2                      41291                  01-mar-2010 11:28:11 am
    IRDNCAS01                      Open             1                      2                      38847                  01-mar-2010 10:47:27 am
    IRDNCAS01                      All Report       3                      1                      37947                  01-mar-2010 10:32:27 am
    IRDNCST02                      Open             1                      3                      35332                  01-mar-2010 09:48:52 am
    IRDNCST02                      All Report       3                      1                      32632                  01-mar-2010 09:03:52 am
    IRDNCST02                      Open             1                      3                      31502                  01-mar-2010 08:45:02 am
    IRDNCST02                      All Report       3                      1                      28802                  01-mar-2010 08:00:02 am
    IRDNCHI01                      Open             1                      3                      25368                  01-mar-2010 07:02:48 am
    IRDNCHI02                      Open             1                      1                      23939                  01-mar-2010 06:38:59 am
    IRDNCMT01                      Open             1                      1                      20696                  01-mar-2010 05:44:56 am
    IRDNCCH02                      Open             1                      1                      13452                  01-mar-2010 03:44:12 am
    Edited by: Indhu Ram on Mar 11, 2010 1:34 PM
    Edited by: Indhu Ram on Mar 11, 2010 2:20 PM

    If you look at the table which is output of the given query , there is column called "STATE_ID" It shows the current state ie open or closed or all report.
    The column 'PREVIOUS_STATE' shows the state before the current state. .In the table in 2nd row in previous_state column there is state_id = 1 (open)which is the state before 'all report state'

  • Calculate time difference in Labview from excel file

    I am reading in values from a excel files, the file contains date and time data in one cell, then either an On or Off value in the cell next to it. I would like to find the time difference between the on and the off cycles. The VI I have so far brings in the Excel file but I don't know how to subtract the dates. Any help would be appreciated. I have attached the vi and hopefully I can attach and example excel file.
    Attachments:
    Hobo Import.vi ‏156 KB

    Hi Bryan!
    I made a small VI (in LabVIEW 7.1) that converts to strings (of your format) to timestamp datatype and then subtracts them resulting in a difference measured in seconds. There might be a more optimal way to do this in your application, but I thought I'd at least try to contribute. Also, notice that there is a Y3K bug in there :-)
    Hope this helps!
    Travis H.
    National Instruments
    Travis H.
    LabVIEW R&D
    National Instruments
    Attachments:
    FormattoTimeStamp.vi ‏38 KB

  • How to write a query to get the time difference of two varchar type time columns

    Hi,
    I want to get the time difference between the two varchar type columns.please see the attached image for more details:
    My requirement is like:
    timestarted
    timeended
    timediff
    9:00:00
    10:00:00
    1:00
    9:15
    9:30:00
    0:15

    Storing time alone as VARCHAR2 value is a incorrect design. Always store it as DATE or TIMESTAMP.
    If you already have a messed up design and cant change it, then you need to convert your VARCHAR2 time into a DATE or TIMESTAMP and find the difference. I have converted it to TIMESTAMP and obtained the difference as INTERVAL.
    SQL> with t
      2  as
      3  (
      4  select '09:00:00' timestarted, '10:00:00' timeended from dual
      5  union all
      6  select '09:15:00' timestarted, '09:30:00' timeended from dual
      7  )
      8  select timestarted
      9       , timeended
    10       , (timeended - timestarted) day to second diff
    11    from (
    12          select to_timestamp('01011900' || timeended, 'ddmmyyyyhh24:mi:ss') timeended
    13               , to_timestamp('01011900' || timestarted, 'ddmmyyyyhh24:mi:ss') timestarted
    14            from t
    15         );
    TIMESTARTED                                        TIMEENDED                                          DIFF
    01-JAN-00 09.00.00.000000000 AM                    01-JAN-00 10.00.00.000000000 AM                    +00 01:00:00.000000
    01-JAN-00 09.15.00.000000000 AM                    01-JAN-00 09.30.00.000000000 AM                    +00 00:15:00.000000
    SQL>

  • Avg Time  Difference of Two timestamps in Oracle SQL

    Hello Members,
      I am trying to find the average of Time Difference of two timestamp columns by order number. I need to show the average of the time difference in hours:mins format. I have is SQL Server , but unable to get this in Oracle SQL. Could anyone please let me know how I need to find the time difference of two timestamp columns and show them in hh:mm fomat and then take average of these differences and show them in hh:mm format.  Below is what I have tried in SQL server.
    CREATE TABLE temp
    startdate smalldatetime,
    enddate smalldatetime
    INSERT temp
    SELECT '6/22/2013 19:00',
    '6/22/2013 19:20'
    UNION ALL
    SELECT '6/22/2013 19:22',
    '6/22/2013 19:44'
    UNION ALL
    SELECT '6/22/2013 19:45',
    '6/22/2013 19:50'
    UNION ALL
    SELECT '6/22/2013 19:52',
    '6/22/2013 20:02'
    UNION ALL
    SELECT '6/22/2013 20:05',
    '6/22/2013 20:10'
    UNION ALL
    SELECT '6/22/2013 20:15',
    '6/22/2013 20:20'
    SELECT CAST
    CAST
    ( SUM
    DATEDIFF(MINUTE,startdate,enddate)
    6*60
    As float)
    as varchar) + ':' +
    cast
    cast
    cast
    SUM
    DATEDIFF(MINUTE,startdate,enddate)
    6
    as int )
    % 60 as float )
    as varchar ) AS avg_time_diff_in_hh_mm_format
    FROM temp
    Please let me know if you need additional information.
    Thanks in Advance.

    Thanks for the reply Frank,
      I have tried some similar lines with your suggested approach, please see below:
    --DDL
    CREATE TABLE XX_ORD_TIMES
    (ORDER_NUM NUMBER(15),
             ACTUAL_START_DATE DATETIME,
             ACTUAL_FINISH_DATE DATETIME)
    --Sample Data
    Insert into XX_ORD_TIMES
       (ORDER_NUM, ACTUAL_START_DATE, ACTUAL_FINISH_DATE)
    Values
       ('SFM-07', TO_DATE('06/20/2013 14:22:58', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('06/21/2013 07:58:55', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into XX_ORD_TIMES
       (ORDER_NUM, ACTUAL_START_DATE, ACTUAL_FINISH_DATE)
    Values
       ('SFM-07', TO_DATE('06/21/2013 09:12:42', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('06/21/2013 09:18:15', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into XX_ORD_TIMES
       (ORDER_NUM, ACTUAL_START_DATE, ACTUAL_FINISH_DATE)
    Values
       ('SFM-07', TO_DATE('06/20/2013 15:59:07', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('06/20/2013 17:06:17', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into XX_ORD_TIMES
       (ORDER_NUM, ACTUAL_START_DATE, ACTUAL_FINISH_DATE)
    Values
       ('SVCEXT', TO_DATE('05/16/2013 11:56:05', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('05/24/2013 14:47:54', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into XX_ORD_TIMES
       (ORDER_NUM, ACTUAL_START_DATE, ACTUAL_FINISH_DATE)
    Values
       ('SVCEXT', TO_DATE('05/07/2013 09:23:37', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('05/07/2013 13:00:14', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into XX_ORD_TIMES
       (ORDER_NUM, ACTUAL_START_DATE, ACTUAL_FINISH_DATE)
    Values
       ('SVCEXT', TO_DATE('05/09/2013 14:06:08', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('05/22/2013 13:25:03', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into XX_ORD_TIMES
       (ORDER_NUM, ACTUAL_START_DATE, ACTUAL_FINISH_DATE)
    Values
       ('SVCNEWPLON', TO_DATE('05/21/2013 13:17:45', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('05/24/2013 14:35:04', 'MM/DD/YYYY HH24:MI:SS'));
    Insert into XX_ORD_TIMES
       (ORDER_NUM, ACTUAL_START_DATE, ACTUAL_FINISH_DATE)
    Values
       ('SVCNEWPLON', TO_DATE('05/24/2013 09:00:04', 'MM/DD/YYYY HH24:MI:SS'), TO_DATE('05/29/2013 09:30:32', 'MM/DD/YYYY HH24:MI:SS'));
    --Avg time diffs
    SELECT  ORDER_NUM,
             ACTUAL_START_DATE
             ACTUAL_FINISH_DATE
                    TO_NUMBER (
                       SUBSTR (
                          NUMTODSINTERVAL (
                             AVG (
                                  CAST (ACTUAL_FINISH_DATE AS DATE)
                                - CAST (ACTUAL_START_DATE AS DATE)),
                             'DAY'),
                          2,
                          9))
                  * 24
                + TO_NUMBER (
                     SUBSTR (
                        NUMTODSINTERVAL (
                           AVG (
                                CAST (ACTUAL_FINISH_DATE AS DATE)
                              - CAST (ACTUAL_START_DATE AS DATE)),
                           'DAY'),
                        12,
                        2))
             || ':'
             || CASE
                   WHEN LENGTH (
                           TO_NUMBER (
                              SUBSTR (
                                 NUMTODSINTERVAL (
                                    AVG (
                                         CAST (ACTUAL_FINISH_DATE AS DATE)
                                       - CAST (ACTUAL_START_DATE AS DATE)),
                                    'DAY'),
                                 15,
                                 2))) < 2
                   THEN
                         '0'
                      || TO_NUMBER (
                            SUBSTR (
                               NUMTODSINTERVAL (
                                  AVG (
                                       CAST (ACTUAL_FINISH_DATE AS DATE)
                                     - CAST (ACTUAL_START_DATE AS DATE)),
                                  'DAY'),
                               15,
                               2))
                   ELSE
                      TO_CHAR (
                         SUBSTR (
                            NUMTODSINTERVAL (
                               AVG (
                                    CAST (ACTUAL_FINISH_DATE AS DATE)
                                  - CAST (ACTUAL_START_DATE AS DATE)),
                               'DAY'),
                            15,
                            2))
                END
                AS TIME_DIFF
        FROM XX_ORD_TIMES
       GROUP BY ORDER_NUM,
             ACTUAL_START_DATE
             ACTUAL_FINISH_DATE
             order by 1;
    Yes, I am trying to show the time difference of two timestamps ( finish date , start date ) in Hours:Mins  and also calculate the average of this Hours : Mins by ORDER_NUM .
    Please advise.
    Thanks again.

Maybe you are looking for

  • Question on organisational structure!

    Hi all SAP experts. I had a problem : I've created my organisational structure on 1st June 2010, I want to check is there any way i can change the start date for my organisational structure? Thanks for all advices. Regards, HongLing

  • Blocking of complete Vendor MAC Address

    Hi All, is it possible to Block or Disable a complete Vendor MAC - like  Apple 7c:6d:62:x:x:x - with using Wildcards on a Wireless LAN Controller? Background is, that the Customers IT-Department is only allowing the use of one Vendor, so every MAC Ad

  • How to print and input text in Adobe Edge

    Hi everybody! I have an input and I need to create a button that when pressed, send to print the text the user typed in the input. Any idea how to do that? thank you very much

  • N95 8GB power saver lightning problem !?

    Hi There ,, I just got my new N95 8GB everything works fine , until i saw this problem i have this strange screen(power) saver lightning like if it was flashing or some like that so if anyone had this problem please help Model: N79 Type: RM-348 Softw

  • Stroke with a constant width (using AffineTransform)

    I need to have a java.awt.Stroke that has a line width (and preferably using BasicStroke, a dash array) which is independant of the current scale of the Graphics2D object i'm drawing to. I.e. a scaling of 1000 in x and a stroke of width 2 drawn as 2