String
\"2011-05-19 10:30:14\"
To
Thu May 19 10:30:14 UTC 2011
How can I convert specific string to this
require 'date' date = DateTime.parse("2011-05-19 10:30:14") formatted_date = date.strftime('%a %b %d %H:%M:%S %Z %Y')
See strftime() for more information about formatting dates.