I just want to know what you do when you have a datetime field, i.e.
Game.first.starts_at
=> Thu, 03 Dec 2009 20:20:00 EST -05: 00
And you want to request it in the date field:
3.days.from_now.to_date.to_s (: db)
=> "2009-12-03"
I am currently doing this work with an operator BETWEEN, but I would like to know more approaches to solve this problem. Thanks in advance.
source
share