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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

only date in a group by 1

Status
Not open for further replies.

gmanouvrier

Programmer
Apr 2, 2004
5
FR
Hi,
I have to calculate the sum of phones calls by day.
So i wrote these query :
select dt, count(id_ticket) from ticket group by dt

(dt is the date '2003/12/02 10:23:46')
But the whole date is taken into account. i only want the current date without the hours, etc...
How could i suceeded in?
 
Code:
select convert(char(10),dt,101) as DT, 
count(id_ticket) 
from ticket 
group by convert(char(10),dt,101)

this should do it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top