From: Rod Taylor <pg@rbt.ca>
To: George A.J <jinujosein@yahoo.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: DateDiff in PostgreSQL
Date: Fri, 07 Nov 2003 08:55:48 -0500
Message-ID: <1068213347.42603.2.camel@jester> (raw)
In-Reply-To: <20031107133409.25844.qmail@web14909.mail.yahoo.com>
References: <20031107133409.25844.qmail@web14909.mail.yahoo.com>
> ie, a function that returns difference of two dates(timestamp) in days
> or months or year..
>
> The - operator for timestamp retuns the intervel in days only.
rbt=# select extract('days' from current_timestamp -
'2003-01-01'::timestamp);
date_part
-----------
310
(1 row)
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: pg@rbt.ca, jinujosein@yahoo.com
Subject: Re: DateDiff in PostgreSQL
In-Reply-To: <1068213347.42603.2.camel@jester>
* 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