Search Postgresql Archives

Re: [SQL] function to find difference between in days between two dates

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

Attachment: signature.asc
Description: Digital signature


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux