From: | Yasir Malik <ymalik(at)heineken(dot)cs(dot)stevens-tech(dot)edu> |
---|---|
To: | "George A(dot)J" <jinujosein(at)yahoo(dot)com> |
Cc: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: DateDiff in PostgreSQL |
Date: | 2003-11-07 13:40:52 |
Message-ID: | Pine.LNX.4.58.0311070839130.20653@heineken.cs.stevens-tech.edu |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
Hi,
You can use the age() function to find the difference between dates, and
use the extract() function to get the years, months, days, etc.
Yasir
On Fri, 7 Nov 2003, George A.J wrote:
> Date: Fri, 7 Nov 2003 05:34:09 -0800 (PST)
> From: George A.J <jinujosein(at)yahoo(dot)com>
> To: pgsql-sql(at)postgresql(dot)org
> Subject: [SQL] DateDiff in PostgreSQL
>
>
> Hi,
>
> i am converting a MSSQL Server database to PostgreSQL.
>
> Using PostgreSQL version 7.3.2.
>
> Is there any function like the DateDiff() in MSSQL Server.
>
> 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.
>
> Please help
>
> jinujose
>
>
> ---------------------------------
> Do you Yahoo!?
> Protect your identity with Yahoo! Mail AddressGuard
From | Date | Subject | |
---|---|---|---|
Next Message | Yasir Malik | 2003-11-07 13:45:16 | Re: DateDiff in PostgreSQL |
Previous Message | George A.J | 2003-11-07 13:34:09 | DateDiff in PostgreSQL |