From: Gordon Thiesfeld Date: 2007-08-01T06:40:07+09:00 Subject: Re: help with string matching On Jul 31, 2:47 pm, Dan Daniels wrote: > This does not work: > > logdate = "#...@calendar1.year}-" + (@calendar1.month + 1).to_s + > "-...@calendar1.day}" > #output is: 2007-07-30 You might also look at using Time#strftime to get your string: >> t = Time.local(2007,7,30) => Mon Jul 30 00:00:00 -0500 2007 >> t.strftime('%Y-%m-%d') => "2007-07-30"