Re: [GENERAL] datetime problems - Mailing list pgsql-general

From Memphisto
Subject Re: [GENERAL] datetime problems
Date
Msg-id Pine.GSO.3.96.981021170847.29288A-100000@valerie.inf.elte.hu
Whole thread Raw
In response to Re: [GENERAL] datetime problems  (Herouth Maoz <herouth@oumail.openu.ac.il>)
Responses Re: [GENERAL] datetime problems
List pgsql-general
On Wed, 21 Oct 1998, Herouth Maoz wrote:

> At 15:45 +0200 on 21/10/98, Memphisto wrote:
>
>
> > I'm terrible sorry, I meant to type login_start and no login_time which is
> > and  intervallum. Thanks again for your help.
>
> By the way, I was thinking, and my WHERE clause may not catch datetimes
> which are on Aug 31, 1998, in the middle of the day. Better use:
>
> WHERE the_date >= '1998-08-01' AND the_date < '1998-09-01';
>
Thanks.
Another problem. I issued the following query:
select * from annex_log where login_start
    between
    (select date_trunc('month','now'::datetime)) and
    (select date_trunc('month','now'::datetime)) +
    timespan('1 month'::reltime);

but postgresql said there's a parse error near select
while the following query did work

select * from annex_log where login_start >=
    (select date_trunc('month','now'::datetime)) and login_start <
    (select date_trunc('month','now'::datetime) +
    timespan('1 month'::reltime));

Why?

--------------------------------------------------------------------------------
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: Sferacarta Software
Date:
Subject: Re: [GENERAL] aggregate question
Next
From: Herouth Maoz
Date:
Subject: Re: [GENERAL] datetime problems