Answers for "how to get records of a particular month in rails"

1

find records created in a particular month rails

Model.where(:date_column => date)

Model.where('extract(year  from date_column) = ?', desired_year)
Model.where('extract(month from date_column) = ?', desired_month)
Model.where('extract(day   from date_column) = ?', desired_day_of_month)
Posted by: Guest on August-25-2020

Code answers related to "how to get records of a particular month in rails"

Browse Popular Code Answers by Language