DefinityCorporation
IS-IT--Management
I am trying to create a report with ASP & SQL that will show average time a claim is open between dates. Can you SUM datetime? I was thinking create RecordSet for all DATEDIFF, (start, finish), then convert to numeric, then SUM, then divide by Number of claims. But I have no idea how to do this! Is there an easier way? Please give me some ideas. Examples will help cause im new @ SQL.
THANKS!
table "claims"
-------------------------------------------------------------------
id (int) | start_date (datetime) | close_date (datetime)
-------------------------------------------------------------------
10000001 | 1/8/2003 3:40:51 PM | 1/10/2003 4:10:51 PM
10000002 | 1/9/2003 6:41:50 PM | 1/10/2003 5:30:28 PM
10000003 | 1/9/2003 7:51:50 PM | 1/10/2003 7:30:28 PM
~ | ~ | ~
10102343 | 3/9/2004 7:51:50 PM | 3/10/2004 7:30:28 PM
THANKS!
table "claims"
-------------------------------------------------------------------
id (int) | start_date (datetime) | close_date (datetime)
-------------------------------------------------------------------
10000001 | 1/8/2003 3:40:51 PM | 1/10/2003 4:10:51 PM
10000002 | 1/9/2003 6:41:50 PM | 1/10/2003 5:30:28 PM
10000003 | 1/9/2003 7:51:50 PM | 1/10/2003 7:30:28 PM
~ | ~ | ~
10102343 | 3/9/2004 7:51:50 PM | 3/10/2004 7:30:28 PM