title: Ignoring Time stamp for a count in SQL Server 2005
body: <p>I am having an issue figuring out what I thought would be a simple query.
  I have a table with two fields (EntryDateTime, Message) that as you can guess logs specific messages with a time date stamp for a monitoring app.</p>
  <p>I am looking to get a count of all messages of a type per day but the time part of the stamp (while needed for everything else) giving me issues here.</p>
  <p>I was looking to do something like,</p>
  <pre><code>SELECT COUNT(Message)
  FROM DBName.dbo.TableName
  WHERE Message = 'LoginFailed'
  GROUP BY EntryDateTime
  </code></pre>
  <p>What I am looking for as the output is something like</p>
  <blockquote>
  <p>2009-06-26, 142</p>
  <p>2009-06-27, 259</p>
  <p>2009-06-28, 57</p>
  </blockquote>
  <p>Of course this is giving me an output of messages more like</p>
  <blockquote>
  <p>2009-06-26 00:01:01, 11</p>
  <p>2009-06026 00:01:02, 12</p>
  </blockquote>
  <p>Any help getting ride of the timestamp for this query would be very helpful. I would like to not have to manually enter any date ranges as this query will be searching a years worth of logging and I would love to not enter 365 date ranges for a <code>BETWEEN</code> type query.</p>