pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Herouth Maoz <herouth@oumail.openu.ac.il>
To: patrice@idf.net, Kevin Colagio <kcolagio@wc.eso.mc.xerox.com>
Cc: pgsql-sql@postgreSQL.org
Subject: Re: [SQL] Time related question...
Date: Wed, 17 Jun 1998 16:17:15 +0300
Message-ID: <l03110707b1ad7204baf8@[147.233.159.109]> (raw)
In-Reply-To: <Pine.LNX.3.96.980617144048.3074A-100000@paris.ivo.fr>
References: <199806171233.IAA01017@bentley.eso.mc.xerox.com>

At 15:45 +0300 on 17/6/98, Patrice Hédé wrote:


> with datetime, it could be then :
>
> select * from servicecall whre (dateclosed - dateentered) < '3 days';
>
> However, if you really need abstime, I don't know the answer.

Actually, all that needs be done is to cast the abstime as datetime. Such as:

SELECT *
FROM servicecall
WHERE ( datetime( dateclosed ) - datetime( dateentered ) ) < '3 days';

Herouth

--
Herouth Maoz, Internet developer.
Open University of Israel - Telem project
http://telem.openu.ac.il/~herutma





view thread (4+ messages)

Message-ID: <l03110707b1ad7204baf8@[147.233.159.109]>
Permalink:  ../l03110707b1ad7204baf8@%5B147.233.159.109%5D/
Also on:    postgresql.org/message-id/l03110707b1ad7204baf8@[147.233.159.109]

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: herouth@oumail.openu.ac.il, kcolagio@wc.eso.mc.xerox.com
  Subject: Re: [SQL] Time related question...
  In-Reply-To: <l03110707b1ad7204baf8@[147.233.159.109]>
  References: <199806171233.IAA01017@bentley.eso.mc.xerox.com> <l03110707b1ad7204baf8@[147.233.159.109]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox