On Jun 22, 2006, at 3:12 , James L. wrote:
relies on the fact that the underlying data looks like “yyyy-mm-dd
hh:mm:ss”. It works on Postgres anyway.
You’re probably safer using SQL-spec CURRENT_DATE or
CURRENT_TIMESTAMP (which PostgreSQL also supports). And I’m not sure
why you’re using LIKE. I’d just use a straight-up =.
:conditions => ‘start_date = CURRENT_DATE’
If your start_date includes time which you wish to ignore (i.e., you
want to return records with start_date ‘2006-06-22 12:00’ and
‘2006-06-22 13:00’ when you’re searching for today on 2006-06-22),
you may want to use
:conditions => ‘CAST(start_date AS DATE) = CURRENT_DATE’
Hope this helps.
grzm seespotcode net