From: Jeremy Bopp Date: 2011-02-03T13:47:32+09:00 Subject: Re: Converting date format (CSV to yaml) On 02/02/2011 10:36 PM, Kamarulnizam Rahim wrote: > Hi, > > I used the following code: > > cdate = "2011-01-12" > m, d, y = cdate.split('/').map{|i| if i.length == 1 then "0#{i}" else i > end} > pp ydate = "#{y}-#{d}-#{m}" > > Output: > "2011-01-12" > > How i change it to: > 2011-01-12 <-- without the quotation mark The pp method is adding the quotation marks when printing the string. The quotes are not really in the string's value. Try using puts instead of pp to see the difference. -Jeremy