Select_date method

Hi Everyone,
I used “select_date” method in my application and got 3 select boxes
for Date, Month and Year.
Code :

<%= text_field ‘content’, ‘title’ %>
<%= text_field ‘content’, ‘description’ %>
<%= select_date %>
Now, i want to update it to my database with column name “startDt”.
but i unable to do it. I am unable to name those select boxes.
Can anyone help with this…

Thanks in advance
Regards,
Vasanth

use this for select-date ‘content’, ‘startDt’
and use start_form_tag :action=>“xyz”
and end_form_tag

i got only this, if u are not expecting this please explain in clear…
Vasanthakumar C. wrote:

Hi Everyone,
I used “select_date” method in my application and got 3 select boxes
for Date, Month and Year.
Code :

<%= text_field ‘content’, ‘title’ %>
<%= text_field ‘content’, ‘description’ %>
<%= select_date %>
Now, i want to update it to my database with column name “startDt”.
but i unable to do it. I am unable to name those select boxes.
Can anyone help with this…

Thanks in advance
Regards,
Vasanth

Hi,
Thanks for ur help. But problem is not solved.

Actually i can insert or update (without select_date field), but the
requirement is : i should get a date + month + year from user and store
it in database (column name “startDt” type “DateTime”)

Still, i did as u told but got this error
“undefined method `year’ for “content”:String”

Please help me out…

try this,
<%= start_form_tag :action => ‘xyz’ %>
<%= datetime_select ‘content’, ‘StartDt’ %>
<%= submit_tag “Create” %>
<%= end_form_tag %>

Vasanthakumar C. wrote:

Hi,
Thanks for ur help. But problem is not solved.

Actually i can insert or update (without select_date field), but the
requirement is : i should get a date + month + year from user and store
it in database (column name “startDt” type “DateTime”)

Still, i did as u told but got this error
“undefined method `year’ for “content”:String”

Please help me out…

Yes it worked out… :slight_smile:
Thanks a lot.
Bye