title: LINQ to group objects according to timestamp
body: <p>I have a serial of object defined as:</p>
  
  <pre><code>public class Foo
  {
             public DateTime Time {get;set;}
  }
  </code></pre>
  
  <p>now I want to group objects(<code>IEnumerable&lt;Foo&gt;</code>) according to the time, e.g. I want to group them according to <strong>hour or day or month</strong>.</p>
  
  <p>for example (group into hour):</p>
  
  <pre><code>group 1(13:00-14:00) : foo1, foo2, foo3
  group 2(14:00-15:00): foo4, foo5
  </code></pre>
  
  <p>How to write LINQ over this? hope I made myself clear.</p>