title: LINQ group-by and then display datetime for (dd mmm)
body: <p>I want Linq to group by date but display in text</p>
  
  <p>here is my code</p>
  
  <pre><code>var groups = _uow.Orders.GetAll()
              .Where(x =&gt; x.Created &gt; baselineDate)
              .GroupBy(x =&gt; x.Created.ToString("yyyy-MM-dd"));
  
  var orders = new
          {
              Day = groups.Select(g =&gt; g.Key).ToArray(),
              Total = groups.Select(g =&gt; g.Sum(t =&gt; t.Total)).ToArray(),
          };
  </code></pre>
  
  <p>the result is (not good to put in label of graph)</p>
  
  <pre><code> {"Day": [2, 3, 4, 5], "Total": [9999.00, 9999.00, 9999.00, 9999.00] }
  </code></pre>
  
  <p>But i want this (Monthly)</p>
  
  <pre><code>"Day": ['Jan', Feb', 'Mar', 'Apr'], "Total": [9999.00, 9999.00, 9999.00, 9999.00] }
  </code></pre>
  
  <p>Or Daily</p>
  
  <pre><code>"Day": ['Jan 1', 'Jan 2', 'Jan 3', 'Jan 4'], "Total": [9999.00, 9999.00, 9999.00, 9999.00] }
  </code></pre>
  
  <p>Please advice me for DateTime.ToString() that i can play with.</p>
  
  <p>Thank you all.</p>