Re: DateDiff in PostgreSQL - Mailing list pgsql-sql

From Yasir Malik
Subject Re: DateDiff in PostgreSQL
Date
Msg-id Pine.LNX.4.58.0311070839130.20653@heineken.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:
Date:
Subject: Getting the row_count value outside of a function
Next
From: ron_tabada
Date:
Subject: help me...