Re: timestamp interval issue - Mailing list pgsql-novice

From Valentin Gjorgjioski
Subject Re: timestamp interval issue
Date
Msg-id 47076E82.4080901@mt.net.mk
Whole thread Raw
In response to Re: timestamp interval issue  (Valentin Gjorgjioski <tinodj@mt.net.mk>)
List pgsql-novice
On 06.10.2007 13:10 Valentin Gjorgjioski wrote:
> 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')
> )
There is a little error (last today should be yesterday)
  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>('yesterday'::timestamp+interval '16 hours')
  )

pgsql-novice by date:

Previous
From: Valentin Gjorgjioski
Date:
Subject: Re: timestamp interval issue
Next
From: Nis Jørgensen
Date:
Subject: Re: timestamp interval issue