order by day or month, etc

From: "Leo Xavier" <info(at)megabenfica(dot)com>
To: <pgsql-sql(at)postgresql(dot)org>
Subject: order by day or month, etc
Date: 2001-01-03 00:22:14
Message-ID: 001201c0751b$39405ca0$8902a8c0@centro.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hello
first time I post something... good morning everyone!
short presentation: Leo Xavier, Lisbon - Portugal, 17 years, my home-made
site: www.megabenfica.com
Sql7, win 2000...

The question:
How for example do I select all entrys from a certain month (of a certain
year, of course) ?
Or from a certain day? And how from a certain period, between day X and Y,
i.e?

The solution i found is to create three columns in the table: one with the
day, a second with the month, a thir with the year... but this really is a
little bit unprofessional ...

doing this:
SELECT to_char(field, 'DD/MM/YYYY') AS new_date

as Francis Solomon said, didnt work... "unrecognized function" ...

can anyone help me??
Leo Xavier

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2001-01-03 01:02:44 Re: Weird problem with script...
Previous Message jkakar 2001-01-03 00:01:18 Weird problem with script...