# \[nuby\] about date\_select, getting into DB

**URL:** <https://www.ruby-forum.com/t/nuby-about-date-select-getting-into-db/92944>\
**Category:** Rails\
**Created:** [April 25, 2007, 11:15pm UTC](https://www.ruby-forum.com/t/nuby-about-date-select-getting-into-db/92944 "2007-04-25T23:15:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![szbeam](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/f19dbf/32.png) [@szbeam](https://www.ruby-forum.com/u/szbeam)\
**Post date:** [April 25, 2007, 11:15pm UTC](https://www.ruby-forum.com/t/nuby-about-date-select-getting-into-db/92944/1 "2007-04-25T23:15:32Z")

</div>

Hello Everyone,

I am trying to use the date\_select() form helper method per AWDWROR. In  
the DB the column “entry\_date” is a datetime.

So using the below form, in part

============ app/views/entry/index.rhtml ===

 date \<%= date\_select("entry\_date", :start) %\>

how do I get it into the AR instance?

============ app/controllers/EntryController.rb =======  
def create  
@entry = Entry.new(  
:entry\_date =\> params[:entry\_date][“start”],  
:task\_id =\> params[:task][:id],  
:description =\> params[:description]  
);  
end

This gives me “entry\_date cannot be null” from mysql.

The backtrace/debug dump on the error page mentioned that  
Parameters: …  
“entry\_date”=\>{“start(1i)”=\>“2007”, “start(2i)”=\>“4”, “start(3i)”=\>“25”}

where did that (1i), (2i) stuff come from? what does it mean?

In any case I was hoping to use a DHTML calendar pop-up for this date  
entry, but wanted to get this working for the prototype. So if you can  
help I appeciate it

thanks  
Sam
