From: Mark Thomas Date: 2008-06-26T04:27:56+09:00 Subject: Re: Date.parse("28/03/2008") gives error??? On Jun 25, 10:31 am, Shankar Narayanan wrote: > Mark Thomas wrote: > > >> 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. > > Does it have anything to do with the version of Ruby/Rails ? I'm using > Rails 1.1.6 and Ruby 1.8.4.  Another wierd thing about this is > dateStr.to_time works while dateStr.to_date again gives me the same > exception. It might. I'm using 1.8.6