Re: Date interval - Mailing list pgsql-sql

From sad
Subject Re: Date interval
Date
Msg-id 200309261016.10724.sad@bankir.ru
Whole thread Raw
In response to Date interval  ("Richard Sydney-Smith" <richard@ibisaustralia.com>)
List pgsql-sql
On Friday 26 September 2003 09:18, you wrote:
> 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)

SELECT  now()::DATE - '1900-12-10'::DATE;
           ?column?
--------------------------------37545


SELECT  now()-'1900-12-10'::timestamp;
           ?column?
--------------------------------37545 days 06:10:54.2021608353





pgsql-sql by date:

Previous
From: Tomasz Myrta
Date:
Subject: Re: Date interval
Next
From: Peter Eisentraut
Date:
Subject: Re: RFC: i18n2ascii(TEXT) stored procedure