KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
How do I select the last date in a table where the column name is Lars. I have tried this: <%= Reklamer.where(":dato => :dato, AND :name => :name", :date => Date.last, :name => "Lars") %> I have tried this: <%= Reklamer.where(name: 'Lars').order('dato ASC').limit(1).select('dato').inspect %> Output: [#<Reklamer dato: "2011-02-15 23:53:28">] I need just a datetime format like: 2011-02-15 23:53:28 How do I do that?
Tags (comma-separated)
Save Edits
Cancel