Re: Number of days

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Mihai Gheorghiu" <tanethq(at)earthlink(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Number of days
Date: 2001-07-06 19:47:42
Message-ID: 18264.994448862@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Mihai Gheorghiu" <tanethq(at)earthlink(dot)net> writes:
> Is there a function that returns the number of days between two dates?

Subtraction.

regression=# select '27 Feb 2001'::date - '5 Jan 2001'::date;
?column?
----------
53
(1 row)

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2001-07-06 20:00:26 Re: order by + union (was: query syntax change?)
Previous Message Somazx Interesting 2001-07-06 19:18:10 orphaned RI constraints