# Date Range in URL

**URL:** <https://www.ruby-forum.com/t/date-range-in-url/114015>\
**Category:** Rails\
**Created:** [September 7, 2007, 4:24am UTC](https://www.ruby-forum.com/t/date-range-in-url/114015 "2007-09-07T04:24:45Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bitsmith](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/9de053/32.png) [@bitsmith](https://www.ruby-forum.com/u/bitsmith)\
**Post date:** [September 7, 2007, 4:24am UTC](https://www.ruby-forum.com/t/date-range-in-url/114015/1 "2007-09-07T04:24:45Z")

</div>

Hi,  
I want to have a date range in my URL, such as /charges/  
from/:from\_year/:from\_month/:from\_day/to/:to\_year/:to\_month/:to\_day

I want to have two date selection controls on a form, and when the  
form is submitted, I would like to be taken to the appropriate URL,  
such as /charges/from/2007/01/01/to/2007/12/31

The problem is, I don’t know what options to pass date\_select in order  
to have the params generated match those shown in my route.

Any help is appreciated!
