On 10 March 2010 10:17, Newb Newb <[email protected]> wrote: > Hello all, > I want to compare the below given times. > > from_time = '08:00 am' > to_time = '04:30 pm' > > @logtime = "ci.time >= '#{from_time}' and ci.time <= '#...@to_time}'" >
As it stands, those variables are Strings, not Times (or DateTimes), and will be evaluated as strings in the SQL. What values are you storing in the DB? Is it at Datetime format column? -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

