Re: Date Time Function / Age

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alex <alex(at)meerkatsoft(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Date Time Function / Age
Date: 2003-08-28 15:25:57
Message-ID: 20225.1062084357@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Alex <alex(at)meerkatsoft(dot)com> writes:
> is there an easy way to get the Difference between 2 dates in Days... as
> an integer?

Subtract 'em ...

regression=# select '2002-01-01'::date - '2001-01-01'::date;
?column?
----------
365
(1 row)

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Sune Nielsen 2003-08-28 15:27:44 Re: Problems with transactions and sequences
Previous Message Sune Nielsen 2003-08-28 15:23:57 Re: Problems with transactions and sequences