function to find difference between in days between two dates

From: "Ashish Karalkar" <ashish(dot)karalkar(at)info-spectrum(dot)com>
To: <pgsql-general(at)postgresql(dot)org>, <pgsql-sql(at)postgresql(dot)org>
Subject: function to find difference between in days between two dates
Date: 2007-06-14 06:26:15
Message-ID: 006101c7ae4c$ed7edbd0$170211ac@LIONKING.COM
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-sql

Hello all,

Is there any function to find differences in days between two dates?

I am using

select abs(current_date - '2007-06-15')

to get the desired result.
but I think there must be a function and I am missing it,
if so, can anybody please point me to that.

Thanks in advance

With regards
Ashish Karalkar

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Pavel Stehule 2007-06-14 07:00:12 Re: [SQL] function to find difference between in days between two dates
Previous Message Robin Ericsson 2007-06-14 06:24:15 Re: changing the /tmp/ lock file?

Browse pgsql-sql by date

  From Date Subject
Next Message Pavel Stehule 2007-06-14 07:00:12 Re: [SQL] function to find difference between in days between two dates
Previous Message Jyoti Seth 2007-06-14 06:04:03 Re: [SQL] setof or array as input parameter to postgresql 8.2 functions