Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

sum of time_diff

Status
Not open for further replies.

Ngai88

Programmer
Sep 8, 2004
56
US
hello,
how do I go about getting the sum of time_diff group them by username, function_name?


I have this statment which I manage to get the time_diff from TIME_OUT - TIME_IN

`~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SELECT USERNAME, FUNCTION_NAME, INCIDENT_ID, TIME_IN,
TIME_OUT, INETADDR, to_char(to_date('00:00:00','HH24:MI:SS') +
(TIME_OUT - TIME_IN), 'HH24:MI:SS') time_diff
FROM CMS_LOGINHIST
WHERE TIME_IN > = TO_DATE('01/01/2004', 'MM/DD/YYYY')
and TIME_OUT < = TO_DATE('11/30/2004', 'MM/DD/YYYY')
and INCIDENT_ID=44 ORDER BY USERNAME ASC


thanks,
Ngai
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top