I had the following weird experience. Hopefuly iy's my ignorance on the matter
(but I sort of think this worked before...)
On PostgreSQL 7.0.2, I have an database with two tables, holding different
versions of the data set (some rows missing in one of the tables). Example is:
CREATE TABLE "tes
Actually, PostgreSQL has specific function for this purpose. The query would
be:
SELECT * FROM table WHERE date_part('month', date_field) = '8';
(example to select month 8)
If you use date_trunc, the selection will be by month/year - that is,
date_trunc('month', date_field) will always result
This is not exactly what the original question was about. You select the month
is one specific year only.
What you do it however easier achieved by:
SELECT datums FROM jaunumi WHERE date_trunc('month', datums) = '2000-08-01';
datetime is an type full of tricks. :-)
Daniel
>>>"Sandis" said: