Re: Date Time Function / Age

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: Alex <alex(at)meerkatsoft(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Date Time Function / Age
Date: 2003-08-29 03:07:50
Message-ID: 20030829030750.GA5204@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Aug 28, 2003 at 23:09:44 +0900,
Alex <alex(at)meerkatsoft(dot)com> wrote:
> Hi,
> is there an easy way to get the Difference between 2 dates in Days... as
> an integer?
>
> age('date1','date2') results in x years y days or something similar.
> but I would like to
> have the result in number of days as an integer.

If you subtract two dates (not timestamps) you will get an integer that is
the number of days difference in the dates.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jenny - 2003-08-29 03:08:33 acquiring row and page level locks
Previous Message Derrick Betts 2003-08-29 03:06:16 Errors sending Blob to DB