Skip site navigation (1) Skip section navigation (2)

Re: timestamp interval issue

From: Valentin Gjorgjioski <tinodj(at)mt(dot)net(dot)mk>
To: pgsql-novice(at)postgresql(dot)org
Cc: Michael Glaesemann <grzm(at)seespotcode(dot)net>
Subject: Re: timestamp interval issue
Date: 2007-10-06 11:10:46
Message-ID: 47076D36.6020407@mt.net.mk (view raw or flat)
Thread:
Lists: pgsql-novice
On 06.10.2007 01:37 Michael Glaesemann wrote:
> 
> On Oct 5, 2007, at 18:08 , Valentin Gjorgjioski wrote:
> 
>> where ((now>today:16:00 && date_created>today:16:00) || 
>> (now<today:16:00 && date_created>yesterday:16:00))
> 
> I assume he wanted SQL: what language is this?
> 

ok, here it is ... I was not expecting that writing sql will be a problem...

where
(
now()>('today'::timestamp+interval '16 hours')
AND
date_created>('today'::timestamp+interval '16 hours')
)
OR
(
now()<('today'::timestamp+interval '16 hours')
AND
date_created>('today'::timestamp+interval '16 hours')
)

In response to

Responses

pgsql-novice by date

Next:From: Valentin GjorgjioskiDate: 2007-10-06 11:16:18
Subject: Re: timestamp interval issue
Previous:From: Michael GlaesemannDate: 2007-10-05 23:57:37
Subject: Re: timestamp interval issue

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group