From: Mark Thomas Date: 2008-06-25T22:32:58+09:00 Subject: Re: Date.parse("28/03/2008") gives error??? > Unfortunately for me, the solution by Ray doesn't seem to work too. For > instance I'm doing this.. > > dateStr = params[:startdate].to_s > logger.info "date - " + dateStr > startdate =Date.strptime(dateStr, '%m/%d/%Y').to_s > > and though I get the string quite correctly as > > date - 05/16/2008 > > I end up getting the ArgumentError - invalid date. Please let me know if > I am doing anything incorrect here. Doesn't look like it. Date.strptime("05/16/2008", '%m/%d/%Y').to_s works for me.