Another question related to this... I have everything grouped by
common date, but now I want to do it my month. Any ideas?
On Feb 4, 4:08 am, Rick DeNatale wrote:
> On Wed, Feb 3, 2010 at 3:58 AM, eggie5 wrote:
> > Hi,
>
> > I have a collection of arbitrary objects that have a date attribute. I
Thanks, this is what I was looking for.. not just a flat collection
sorted by date but sorted by date with sub objects ( I don't know how
to explain better).
On Feb 4, 4:08 am, Rick DeNatale wrote:
> On Wed, Feb 3, 2010 at 3:58 AM, eggie5 wrote:
> > Hi,
>
> > I have a collection of arbitrary obj
eggie5 wrote:
> Hi,
>
> I have a collection of arbitrary objects that have a date attribute. I
> want to display these objects by month. For example
>
> @things=Thing.all
>
> Now I want to display in a table all the things by month - how can I
> do this? the problem isn't making a table or anyth
Sharagoz -- wrote:
> To work on the day/month/date portion of a date (mysql)
Not just mySQL. This is standard SQL syntax.
> use
> DAY(your_date) MONTH(your_date) YEAR(your_date).
>
> For instance
> @things = Thing.all(:conditions => "YEAR(created_at)=2009")
Best,
--
Marnen Laibow-Koser
htt
To work on the day/month/date portion of a date (mysql) use
DAY(your_date) MONTH(your_date) YEAR(your_date).
For instance
@things = Thing.all(:conditions => "YEAR(created_at)=2009")
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Goog
5 matches
Mail list logo