From: Richard Sydney-Smith <richard@ibisaustralia.com>
To: pgsql-sql@postgresql.org
Subject: Date interval
Date: Fri, 26 Sep 2003 13:18:27 +0800
Message-ID: <002901c383ed$a70423a0$8f601ad3@athlon2000> (raw)
I am looking for a way to convert an interval into a number of days ( integer);
In sybase I would use :
days(today()-r_expire)
where r_expire is the timestamp I am comparing against.
How do we do this in postgres?
date_trunc(today()-r_expire) does not seem to do it
thanks
Richard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: richard@ibisaustralia.com
Subject: Re: Date interval
In-Reply-To: <002901c383ed$a70423a0$8f601ad3@athlon2000>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox