Search Postgresql Archives

Re: Ordering YYYY MM DD in reverse chrono order

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> ORDER BY
> date_part('year', uu.add_date), date_part('month', uu.add_date),
> date_part('day',  uu.add_date) DESC;

You meant:

ORDER BY
date_part('year', uu.add_date) DESC, date_part('month', uu.add_date) DESC,
date_part('day',  uu.add_date) DESC;


-- 
Scott Ribe
scott_ribe@killerbytes.com
http://www.killerbytes.com/
(303) 665-7007 voice


---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

               http://www.postgresql.org/docs/faqs/FAQ.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux