This discussion is archived
1 2 Previous Next 15 Replies Latest reply: Jan 7, 2013 9:45 PM by 884519 Go to original post RSS
  • 15. Re: Difference between dates in hours
    884519 Newbie
    Currently Being Moderated
    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

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points