1 2 Previous Next 15 Replies Latest reply on Jan 8, 2013 5:45 AM by 884519 Go to original post
      • 15. Re: Difference between dates in hours
        884519
        Thanks all.

        I used below query:

        select floor(((f.actual_completion_date - f.actual_start_date) * 24 * 60 * 60) / 3600) ||
        ' HOURS ' ||
        floor((((f.actual_completion_date - f.actual_start_date) * 24 * 60 * 60) -
        floor(((f.actual_completion_date - f.actual_start_date) * 24 * 60 * 60) / 3600) * 3600) / 60) ||
        ' MINUTES ' ||
        round((((f.actual_completion_date - f.actual_start_date) * 24 * 60 * 60) -
        floor(((f.actual_completion_date - f.actual_start_date) * 24 * 60 * 60) / 3600) * 3600 -
        (floor((((f.actual_completion_date - f.actual_start_date) * 24 * 60 * 60) -
        floor(((f.actual_completion_date -
        f.actual_start_date) * 24 * 60 * 60) / 3600) * 3600) / 60) * 60))) ||
        ' SECS ' time_difference
        from fnd_concurrent_requests
        where phase_code = 'C'
        and request_id = &req_id;
        1 2 Previous Next