Never been to DZone Snippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

About this user

John http://www.red91.com

« Newer Snippets
Older Snippets »
Showing 1-1 of 1 total  RSS 

date_select conversion

function to convert a value from a date_select into a more sql-friendly value

   1  
   2  <%=date_select(:date,'',:start_year => 1950,:include_blank => false, :default => { :year => '1970' })%>
   3  
   4  def convert_date(obj) 
   5    return “#{obj[(1i)]}-#{obj[(2i)]}-#{obj[(3i)]}
   6  end
« Newer Snippets
Older Snippets »
Showing 1-1 of 1 total  RSS