On 1/5/06, Kevin Clark <[EMAIL PROTECTED]> wrote:
> Ok, looks like I was getting which db errs which way incorrectly. Date
> definitely doesn't quote for SQLServer.. here's a snip of my test
> code. Everything runs fine on sqlite and mysql (it handles the date).
>
> ActiveRecord::StatementInvalid: DBI::DatabaseError: Execute
>      OLE error code:80040E07 in Microsoft OLE DB Provider for SQL Server
>         Syntax error converting datetime from character string.
> ...
>
> For the values section for that field I get 'Sat Jan 07 08:51:09
> Pacific Standard Time 2006' which looks to be the the correct
> date.to_s

foo:
  id: 1
  created_at: <%= 5.days.ago.to_s(:db) %>

--
rick
http://techno-weenie.net
_______________________________________________
Rails-core mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails-core

Reply via email to