From: botp Date: 2011-02-03T14:45:02+09:00 Subject: Re: Converting date format (CSV to yaml) On Thu, Feb 3, 2011 at 6:14 AM, Kamarulnizam Rahim wrote: > .csv date format: > > 12/1/2011 > > .yaml date format: > > 2011-01-12 when csv reads the data, it's still a string. you may want to convert the string further to Date. in that case, use Date.strptime and pass the string and it's current format eg in irb, > Date.strptime "12/1/2011", "%d/%M/%Y" #=> # where %d stands for day, %M for month, and %Y for year note, the format must match your string otherwise you'll get errors like invalid date.. best regards -botp