Vance A Heron wrote:
> Comfort Eagle wrote:
>>>
>>
>>   p date
>>   dbh = Mysql.real_connect("localhost", "xxx", "xxxx", "xxxxx")
>>   chg = dbh.query("UPDATE sites set updated='#{date}' where 
>> url='#{url}'")
>>
>>   
> Not sure why exending Date doesn't work (at least in irb), but I believe 
> you
> want to be defining the method 'now' (not Date.now??)
> 
> As an alternate way to do this you could try
> 
> $ irb
> irb(main):001:0> date = Time.now.strftime('%Y-%m-%d')
> => "2006-12-05"
> irb(main):002:0>

Hmm

Sorry I meant to write back... the above code works when you setup your 
mysql tables properly for accepting dates.

-- 
Posted via http://www.ruby-forum.com/.