datetime problems - Mailing list pgsql-general

From Memphisto
Subject datetime problems
Date
Msg-id Pine.GSO.3.96.981021133209.13780C-100000@valerie.inf.elte.hu
Whole thread Raw
In response to re: Help...(summerd@cs.unm.edu)  ("Carilda A. Thomas" <agacat@earthlink.net>)
Responses Re: [GENERAL] datetime problems
List pgsql-general
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



pgsql-general by date:

Previous
From: Przemyslaw Bak
Date:
Subject: Re: [GENERAL] jdbc + postgres
Next
From: Memphisto
Date:
Subject: That bug I mention in my prev. letter