Records as per month

  • Thread starter Naga harish Kanegolla
  • Start date
N

Naga harish Kanegolla

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
 
S

Simen Edvardsen

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

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,772
Messages
2,569,593
Members
45,108
Latest member
AlbertEste
Top