Re: [SQL] Time related question...

From: Herouth Maoz <herouth(at)oumail(dot)openu(dot)ac(dot)il>
To: patrice(at)idf(dot)net, Kevin Colagio <kcolagio(at)wc(dot)eso(dot)mc(dot)xerox(dot)com>
Cc: pgsql-sql(at)postgreSQL(dot)org
Subject: Re: [SQL] Time related question...
Date: 1998-06-17 13:17:15
Message-ID: l03110707b1ad7204baf8@[147.233.159.109]
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Patrice Hédé 1998-06-17 16:22:16 Re: [SQL] Internationalisation: SELECT str (ignoring Umlauts/Accents)
Previous Message Herouth Maoz 1998-06-17 13:02:15 Re: [SQL] Time related question...