Jeremy,
Isn't that what I'm doing with this:
date = Date.new(Time.now.year,Time.now.month,Time.now.day)
today_poll = Poll.find(:date => date);
that doesn't seem to work.
Scott
On Thu, Jul 2, 2009 at 11:24 AM, Jeremy Evans <[email protected]>wrote:
>
> On Jul 2, 9:52 am, David Fisher <[email protected]> wrote:
> > In my experience, Sqlite3 doesn't handle most strings well for date
> > comparisons. It works sometimes, but not always. Postgres has treated
> > me much better so far in this regard.
>
> Yes. As I mentioned, on SQLite, it requires the strings match
> exactly. If you always provided the dates as Date objects, the same
> format should be used. If you ever used strings with a different
> format than Sequel's default, you can't use dates. There are a few
> options:
>
> 1) Use a better database (such as PostgreSQL)
>
> 2) Convert all dates in the database to the standard ISO format that
> Sequel uses, and always use Date objects instead of Strings when
> dealing with date columns.
>
> 3) Use the date/time functions in SQLite to convert all dates to a
> common format (http://sqlite.org/lang_datefunc.html)
>
> 4) Store the year, month, and day in separate columns
>
> Jeremy
> >
>
--
Scott
http://steamcode.blogspot.com/
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sequel-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/sequel-talk?hl=en
-~----------~----~----~----~------~----~------~--~---