Rails: Get the time from a datetime
DateTime.new(2011,10,1,9).to_s(:time) #=> "09:00"
DateTime.now.to_s(:time) #=> "11:58"
From Time docs
strftime will do it.
t = Time.now
t.strftime("%I:%M%p")
All other attributes here:
http://www.wetware.co.nz/blog/2009/07/rails-date-formats-strftime/