Over a million developers have joined DZone.

Turn A Date Range Into SQL Conditions

·
From here on Project.ioni.st.

(6.months.ago.to_date..1.year.ago.to_date).to_s(:db)
=> "BETWEEN '2005-07-27' AND '2005-01-22'"
Topics:

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}