I need to format a string to date:
date = DateTime.parse("05/15/2017")
formatted_date = date.strftime('%m/%d/%Y')
puts formatted_date
But I'm getting an error:
`parse': invalid date (ArgumentError)
And if I try to parse 15/05/2017 then it works.
How to parse 05/15/2017 into %m/%d/%Y format?
strptime.Ruby doesn't want- funny title