# Simple date\_select question

**URL:** <https://www.ruby-forum.com/t/simple-date-select-question/129154>\
**Category:** Rails\
**Created:** [February 14, 2008, 10:58pm UTC](https://www.ruby-forum.com/t/simple-date-select-question/129154 "2008-02-14T22:58:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![pete](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/3ab097/32.png) [@pete](https://www.ruby-forum.com/u/pete)\
**Post date:** [February 14, 2008, 10:58pm UTC](https://www.ruby-forum.com/t/simple-date-select-question/129154/1 "2008-02-14T22:58:19Z")

</div>

Hi-

Using date select for a query and when I try and print the result to  
make sure I am getting the right date, I get this:  
start\_year2007ordermonthdayyear(2i)2start\_year2007ordermonthdayyear(3i)14start\_year2007ordermonthdayyear(1i)2008

View:  
\<%= date\_select ‘startdate’,:start\_year=\>2007,:order =\>  
[:month,:day,:year] %\>

Controller:  
@start = params[:startdate]

Result View:  
\<%= @start %\>

What’s up?

---

<div class="post-metadata">

**Author:** ![pete](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/3ab097/32.png) [@pete](https://www.ruby-forum.com/u/pete)\
**Post date:** [February 15, 2008, 4:03pm UTC](https://www.ruby-forum.com/t/simple-date-select-question/129154/2 "2008-02-15T16:03:58Z")

</div>

Also, this date\_select is not for a model, I would like to parse the  
date to be used outside the model…

---

<div class="post-metadata">

**Author:** ![pete](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/3ab097/32.png) [@pete](https://www.ruby-forum.com/u/pete)\
**Post date:** [February 15, 2008, 4:28pm UTC](https://www.ruby-forum.com/t/simple-date-select-question/129154/3 "2008-02-15T16:28:53Z")

</div>

Found this for anyone else who may have the same question…  
[http://snippets.dzone.com/tag/date\_select](http://snippets.dzone.com/tag/date_select)
