0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

【rails】日付でのDB検索を行いたい

Posted at

例)
start_atカラムで開始時間を管理している。
指定した日付に該当するデータを確認したい。

railsコンソール
search_date = '2021-06-15'
ExamSchedule.where(start_at: search_date.in_time_zone.all_day)

参考記事
https://tech.pla-cole.co/rails-db-action/

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?