Reg:Convesion of string to date

Hi i want to convert my string into date using ruby

Jun 28 2015 to 06/28/2015. Can you help

Have you tried :

require ‘active_support/time’


On Wed, Jul 15, 2015 at 9:06 AM, VIDYA SAGAR POGIRI <
[email protected]> wrote:

To view this discussion on the web visit

For more options, visit

Fernando Kakimoto

require ‘date’
Date.parse(‘Jun 28 2015’).strftime(’%m/%d/%Y’)

irb(main):003:0> Date.parse(‘Jun 28 2015’).strftime(’%m/%d/%Y’)
=> “06/28/2015”

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs