2009/5/21 Tyler Knappe <[email protected]>

>
> WJSimacek wrote:
> > On May 21, 2:28�am, Colin Law <[email protected]> wrote:
> >> If you save it in the database as a datetime then all should be well.
> �If
> >
> > Have you tried using the :db format?:
> >
> >         Time.now.to_s(:db)     #  this forces the save to the db in
> > compatable formats
> >
>

I may have to be corrected, but I don't think this is necessary.  If the db
column is datetime (as defined in the migration and schema.rb) then the
value in a DateTime object should be written (and read) automatically in the
appropriate format.

Colin



>
> > -- Wayne
>
> I'm not sure how to add this to the code.  I've found form helpers very
> unintuitive.  Can anyone point me towards a good guide or documentation?
>
> Thanks,
> -Tyler
> --
> Posted via http://www.ruby-forum.com/.
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to