From: | Martijn van Oosterhout <kleptog(at)svana(dot)org> |
---|---|
To: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
Cc: | Ashish Karalkar <ashish(dot)karalkar(at)info-spectrum(dot)com>, pgsql-general(at)postgresql(dot)org, pgsql-sql(at)postgresql(dot)org |
Subject: | Re: [SQL] function to find difference between in days between two dates |
Date: | 2007-06-14 11:14:03 |
Message-ID: | 20070614111403.GA11436@svana.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-sql |
On Thu, Jun 14, 2007 at 09:00:12AM +0200, Pavel Stehule wrote:
> Hello
>
> PostgreSQL hasn't any official function for it. If you need it, you
> can write own function
Not true. Anything that is done by an operator as actually done by a
function. So the function exists:
# \df date_mi
List of functions
Schema | Name | Result data type | Argument data types
------------+---------+------------------+---------------------
pg_catalog | date_mi | integer | date, date
(1 row)
You may have to dig through the pg_operator table to find it though.
Have a nice day,
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.
From | Date | Subject | |
---|---|---|---|
Next Message | g.hintermayer | 2007-06-14 11:40:12 | precision of epoch |
Previous Message | Marco Colombo | 2007-06-14 10:38:26 | Re: PostGreSQL for a small Desktop Application |
From | Date | Subject | |
---|---|---|---|
Next Message | Salman Tahir | 2007-06-14 11:21:06 | Organization of tables |
Previous Message | Pavel Stehule | 2007-06-14 07:41:29 | Re: [SQL] setof or array as input parameter to postgresql 8.2 functions |