order by day or month, etc - Mailing list pgsql-sql

From Leo Xavier
Subject order by day or month, etc
Date
Msg-id 001201c0751b$39405ca0$8902a8c0@centro.com
Whole thread Raw
Responses RE: order by day or month, etc  ("Francis Solomon" <francis@stellison.co.uk>)
List 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




pgsql-sql by date:

Previous
From: Tom Lane
Date:
Subject: Re: Weird problem with script...
Next
From: Tom Lane
Date:
Subject: Re: FUNCTION returing multiple rows