On 12 March 2010 09:27, Newb Newb <[email protected]> wrote:
> now i m going to store the time 24 hour format...
>
> so is there any funtion to convert the 12hour time to 24 hours

You haven't got a "Time" you've got a "STRING"... anything you do to
it, you're going to have to do some work - and if your choice is to
change a 12hr clock string into a 24hr clock string, I don't see that
makes any difference to your problem, which was about how to search
based on time...

Either:

a) Look at the SQL commands for the DB you're using which manipulate
strings and dates.
b) Change how you store the data into something that can be compared
easily and reliably (so either a DB time/datetime field, or an integer
of "minutes from midnight") - anything but a string.

-- 
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.

Reply via email to