📜  查找在特定月份创建的记录 rails - Ruby 代码示例

📅  最后修改于: 2022-03-11 15:04:46.594000             🧑  作者: Mango

代码示例1
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)