Re: Number of days - Mailing list pgsql-general

From Tom Lane
Subject Re: Number of days
Date
Msg-id 18264.994448862@sss.pgh.pa.us
Whole thread Raw
In response to Number of days  ("Mihai Gheorghiu" <tanethq@earthlink.net>)
List pgsql-general
"Mihai Gheorghiu" <tanethq@earthlink.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

pgsql-general by date:

Previous
From: Somazx Interesting
Date:
Subject: orphaned RI constraints
Next
From: "omid omoomi"
Date:
Subject: Re: Number of days