Re: Order by YYYY MM DD in reverse chrono order trouble - Mailing list pgsql-sql

From Greg Sabino Mullane
Subject Re: Order by YYYY MM DD in reverse chrono order trouble
Date
Msg-id 9ae4fad2ef01b3eebb7769a43b955c0b@biglumber.com
Whole thread Raw
In response to Order by YYYY MM DD in reverse chrono order trouble  (<ogjunk-pgjedan@yahoo.com>)
List pgsql-sql
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
> I am trying to select distinct dates and order them in the reverse
> chronological order.  Although the column type is TIMESTAMP, in this
> case I want only YYYY, MM, and DD back.
If you don't need them separated (which I suspect may be the case),
you can do something like this: 
SELECT DISTINCT TO_CHAR(add_date,'YYYY-MM-DD') AS bb FROM tt ORDER BY bb DESC;
- --
Greg Sabino Mullane greg@turnstep.com
PGP Key: 0x14964AC8 200404240716
-----BEGIN PGP SIGNATURE-----
iD8DBQFAikzOvJuQZxSWSsgRAgqbAKDC75SQd2aExYaniSJIzovOlVjvCACgyOAl
Q2KMp3YGBkQwy5y4h9r/96A=
=4idZ
-----END PGP SIGNATURE-----




pgsql-sql by date:

Previous
From: "Riccardo G. Facchini"
Date:
Subject: Re: Trigger calling a function HELP ME! (2)
Next
From: "Greg Sabino Mullane"
Date:
Subject: Re: Design Problem...