I'd like to issue a query that lists all the rows of a table whose 'date'
columns(its type is datetime) is falls in a month, i.e. these rows were
inserted in , say August. How can I do that?
When I bugged with that problem I found an interesting bug:
elmu=> select date_trunc('month','now'::datetime);
date_trunc
-----------------------------
Thu Oct 01 00:00:00 1998 CEST
(1 row)
That's OK.
elmu=> select date_trunc('month','now'::datetime) + timespan('1
month'::reltime)
;
?column?
----------------------------
Sat Oct 31 23:00:00 1998 CET
(1 row)
Why not Nov 1?
--------------------------------------------------------------------------------
Sebestyén Zoltán AKA Memphisto It all seems so stupid,
it makes me want to give up.
szoli@neumann.cs.elte.hu But why should I give up,
when it all seems so stupid?
MAKE INSTALL NOT WAR And please avoid Necrosoft Widows