RE: [SQL] datediff function

From: Herouth Maoz <herouth(at)oumail(dot)openu(dot)ac(dot)il>
To: "Pham, Thinh" <tpham(at)mail(dot)priority(dot)net>, "'pgsql-sql(at)postgreSQL(dot)org'" <pgsql-sql(at)postgreSQL(dot)org>
Subject: RE: [SQL] datediff function
Date: 1999-08-17 13:28:44
Message-ID: l03130302b3df13be6b8f@[147.233.159.109]
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

At 16:18 +0300 on 17/08/1999, Pham, Thinh wrote:

> What happen if i just want to compare using minute only or hour only instead
> of day? Is there a function to do that or is postgres only work in day?

No problem, just write 'now'::datetime - '6 hours'::timespan. Or some such.
Please read about the datetime and timespan types in the user guide.

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 Tom Lane 1999-08-17 13:34:21 Re: [SQL] datediff function
Previous Message Pham, Thinh 1999-08-17 13:18:55 RE: [SQL] datediff function