Is there an easy way to convert '13-Mar-2009 20:55 PDT' into something
that ruby understands, so that I can output it in a format that mysql
understands?
Crustov wrote:
Is there an easy way to convert '13-Mar-2009 20:55 PDT' into something
that ruby understands, so that I can output it in a format that mysql
understands?
require 'time'
t = Time.parse '13-Mar-2009 20:55 PDT'
t.strftime("%Y-%m-%d") # => "2009-03-13"
···
--
vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407
Awesome. Thanks.
···
On Apr 7, 12:26 pm, Joel VanderWerf <vj...@path.berkeley.edu> wrote:
Crustov wrote:
> Is there an easy way to convert '13-Mar-2009 20:55 PDT' into something
> that ruby understands, so that I can output it in a format that mysql
> understands?require 'time'
t = Time.parse '13-Mar-2009 20:55 PDT'
t.strftime("%Y-%m-%d") # => "2009-03-13"--
vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407