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’
Time.parse(‘2015-07-15’)

Att,
Fernando

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

To view this discussion on the web visit

https://groups.google.com/d/msgid/rubyonrails-talk/14e9b8f6-caf6-4578-9f32-bdb8d6360d88%40googlegroups.com

https://groups.google.com/d/msgid/rubyonrails-talk/14e9b8f6-caf6-4578-9f32-bdb8d6360d88%40googlegroups.com?utm_medium=email&utm_source=footer

.
For more options, visit https://groups.google.com/d/optout.


Fernando Kakimoto
http://www.twitter.com/nandokakimoto

http://apidock.com/ruby/DateTime/strftime

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”