From: Paul Battley Date: 2006-09-01T19:44:31+09:00 Subject: Re: Convert String to date On 01/09/06, aidy wrote: > I have a string object > > "27/07/06" > > that is referenced in this variable: start_date > > what I want to do is convert this string into a date, and add a day to > it. > > Something like this > > start_date = start_date.to_d > end_date = start_date + 1 > > but I cannot see a to_date method. Could anyone please help? require 'date' date = Date.strptime(start_date, '%d/%m/%y') date.year # => 2006 date.month # => 7 date.mday # => 27 (date + 1).mday # => 28 Paul.