per query and result below - how can I get the current year in the first column which is avg time instead of year 1900 - I get first column (avg time) as a result of query below
Thanks in advance
select dateadd(second, datediff(second ,startTIME,endT IME)/2,120) as avg time ,startTIME,endT IME
From table
Where (startTIME >= '2010-02-01 00:00:00') and (endTIME <= '2010-02-01 00:59:59')
group by startTIME,endTI ME
order by startTIME asc
1900-05-01 00:00:13.000 2010-02-01 00:00:00.000 2010-02-01 00:00:26.000
1900-05-01 00:01:15.000 2010-02-01 00:00:00.000 2010-02-01 00:02:30.000
1900-05-01 00:08:16.000 2010-02-01 00:00:02.000 2010-02-01 00:16:35.000
1900-05-01 00:27:55.000 2010-02-01 00:00:02.000 2010-02-01 00:55:53.000
Thanks in advance
select dateadd(second, datediff(second ,startTIME,endT IME)/2,120) as avg time ,startTIME,endT IME
From table
Where (startTIME >= '2010-02-01 00:00:00') and (endTIME <= '2010-02-01 00:59:59')
group by startTIME,endTI ME
order by startTIME asc
1900-05-01 00:00:13.000 2010-02-01 00:00:00.000 2010-02-01 00:00:26.000
1900-05-01 00:01:15.000 2010-02-01 00:00:00.000 2010-02-01 00:02:30.000
1900-05-01 00:08:16.000 2010-02-01 00:00:02.000 2010-02-01 00:16:35.000
1900-05-01 00:27:55.000 2010-02-01 00:00:02.000 2010-02-01 00:55:53.000