I tried parsing using
Date.parse(\"28-May-10\").to_s
Returns 0010-5-28 (which is 2000 years off!)
0010-5-28
How can I get ruby to in
I prefer Date.strptime for this task:
Date.strptime
require 'date' puts Date.strptime("28-May-10", "%d-%b-%y") #2010-05-28