# Categorizing by created\_at

**URL:** <https://www.ruby-forum.com/t/categorizing-by-created-at/135960>\
**Category:** Rails\
**Created:** [April 27, 2008, 1:38am UTC](https://www.ruby-forum.com/t/categorizing-by-created-at/135960 "2008-04-27T01:38:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![garg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/dec6dc/32.png) [@garg](https://www.ruby-forum.com/u/garg)\
**Post date:** [April 27, 2008, 1:38am UTC](https://www.ruby-forum.com/t/categorizing-by-created-at/135960/1 "2008-04-27T01:38:39Z")

</div>

Hello,

If I have a table with created\_at:datetime name:string notes:text  
etc… and I want to display the contents of this table, but I want the  
created\_at date, and then all the items created on that date, and then  
the next date, and all the items with that date and so on… what would  
be a good way to do that? I would need to ignore the time in the  
datetime field.

Thanks

---

<div class="post-metadata">

**Author:** ![garg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/dec6dc/32.png) [@garg](https://www.ruby-forum.com/u/garg)\
**Post date:** [April 27, 2008, 3:58am UTC](https://www.ruby-forum.com/t/categorizing-by-created-at/135960/2 "2008-04-27T03:58:49Z")

</div>

Use group\_by: [Enumerable](http://api.rubyonrails.org/classes/Enumerable.html#M001645)
