Use the SQL EXTRACT function. This is covered in the docs at
http://www.ca.postgresql.org/users-lounge/docs/7.1/postgres/functions-datetime.html#FUNCTIONS-DATETIME-EXTRACT
Briefly, SELECT EXTRACT(MONTH FROM TIMESTAMP '2001-02-30 12:34:56');
returns 2
On Tue, 2002-01-29 at 19:04, Paulo J. Matos wrote:
> I have a field in a table of type date.
> In a results set I get some dates. How can I access the month in
> those dates?
--
Andrew G. Hammond mailto:drew@xyzzy.dhs.org
http://xyzzy.dhs.org/~drew/
56 2A 54 EF 19 C0 3B 43 72 69 5B E3 69 5B A1 1F
613-389-5481
5CD3 62B0 254B DEB1 86E0 8959 093E F70A B457 84B1
"To blow recursion you must first blow recur" -- me