Re: DateDiff in PostgreSQL - Mailing list pgsql-sql

From Yasir Malik
Subject Re: DateDiff in PostgreSQL
Date
Msg-id Pine.SGI.4.58.0311070844400.37772@guinness.cs.stevens-tech.edu
Whole thread Raw
In response to DateDiff in PostgreSQL  ("George A.J" <jinujosein@yahoo.com>)
List 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@yahoo.com>
> To: pgsql-sql@postgresql.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


pgsql-sql by date:

Previous
From: "George A.J"
Date:
Subject: DateDiff in PostgreSQL
Next
From: Tomasz Myrta
Date:
Subject: Re: DateDiff in PostgreSQL