# Records as per month

**URL:** <https://www.ruby-forum.com/t/records-as-per-month/69075>\
**Category:** Ruby\
**Created:** [September 18, 2006, 3:27pm UTC](https://www.ruby-forum.com/t/records-as-per-month/69075 "2006-09-18T15:27:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Naga\_harish\_K](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/90ced4/32.png) [@Naga\_harish\_K](https://www.ruby-forum.com/u/Naga_harish_K)\
**Post date:** [September 18, 2006, 3:27pm UTC](https://www.ruby-forum.com/t/records-as-per-month/69075/1 "2006-09-18T15:27:17Z")

</div>

Hi,  
Could anybody please help me to search the record by date

I have one products table. In that table I have created\_at.I want to  
search the records by date.

I mean, if i select month as january and year as 2006 then i want to get  
the list as per that month only.  
Ex:  
Created At Product Price  
2006-09-18 Ruby 4.5  
2006-09-18 Ruby 4.5  
2006-08-18 Ruby 4.5  
2006-08-04 shq 8.0

If i select September then I should be able to see

Created At Product Price  
2006-09-18 Ruby 4.5  
2006-09-18 Ruby 4.5

So how to do that code?? please help me regarding this…

Thanks in advance  
Harish

---

<div class="post-metadata">

**Author:** ![Naga\_harish\_K](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/90ced4/32.png) [@Naga\_harish\_K](https://www.ruby-forum.com/u/Naga_harish_K)\
**Post date:** [September 18, 2006, 3:39pm UTC](https://www.ruby-forum.com/t/records-as-per-month/69075/2 "2006-09-18T15:39:54Z")

</div>

On 9/18/06, Naga harish Kanegolla [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> 2006-09-18 Ruby 4.5  
> So how to do that code?? please help me regarding this…
> 
> Thanks in advance  
> Harish
> 
> –  
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).

If this is ActiveRecord with Rails, which I’m assuming it is, then the  
Rails mailing list will probably be able to help you better. If it’s  
another library, please specify.
