in my rails application.. i am displaying the dtae time.. which is
coming from the database which property is timestamp.. so in my view the
time is displaying as " Wed Apr 09 16:12:52 +0530 2008 ".. but that in
not which i was actually.. i need to display only themonth, date and
time.. thats it.. just like " Apr 09 16:12 " this.. how to get the time
like this and display.. can any one fine\d me a solution for this
aswell..
Convert to a formatted string - see DATE_FORMATS for predefined
formats. You can also add your own formats to the DATE_FORMATS
constant and use them with this method.
This method is also aliased as to_s.
Examples:
date = Date.new(2007, 11, 10) # => Sat, 10 Nov 2007