Date interval

From: "Richard Sydney-Smith" <richard(at)ibisaustralia(dot)com>
To: <pgsql-sql(at)postgresql(dot)org>
Subject: Date interval
Date: 2003-09-26 05:18:27
Message-ID: 002901c383ed$a70423a0$8f601ad3@athlon2000
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

I am looking for a way to convert an interval into a number of days ( integer);

In sybase I would use :

days(today()-r_expire)

where r_expire is the timestamp I am comparing against.

How do we do this in postgres?

date_trunc(today()-r_expire) does not seem to do it

thanks

Richard

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Tomasz Myrta 2003-09-26 05:57:50 Re: Date interval
Previous Message Josh Berkus 2003-09-26 03:46:39 Re: Case Insensitive comparison