Chris McMahon wrote:
> How can I convert a string such as '2007-01-31 12:22:26' to a Time
> object?
>
>   

Chronic can do that and a whole lot more (in case you need to)!

require 'chronic'

Chronic.parse('2007-01-31 12:22:26')
=> Wed Jan 31 12:22:26 -0800 2007

Chronic.parse('today at 12:22.26')
=> Wed Jan 31 12:22:26 -0800 2007

http://chronic.rubyforge.org

Tom