| From: | Yasir Malik <ymalik(at)cs(dot)stevens-tech(dot)edu> |
|---|---|
| To: | jinujosein(at)yahoo(dot)com |
| Cc: | pgsql-sql(at)postgresql(dot)org |
| Subject: | Re: DateDiff in PostgreSQL |
| Date: | 2003-11-07 13:45:16 |
| Message-ID: | Pine.SGI.4.58.0311070844400.37772@guinness.cs.stevens-tech.edu |
| Views: | Whole Thread | Raw Message | 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 | Tomasz Myrta | 2003-11-07 13:47:25 | Re: DateDiff in PostgreSQL |
| Previous Message | Yasir Malik | 2003-11-07 13:40:52 | Re: DateDiff in PostgreSQL |