Re: Date interval

From: sad <sad(at)bankir(dot)ru>
To: <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Date interval
Date: 2003-09-26 06:16:10
Message-ID: 200309261016.10724.sad@bankir.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Peter Eisentraut 2003-09-26 06:30:45 Re: RFC: i18n2ascii(TEXT) stored procedure
Previous Message Tomasz Myrta 2003-09-26 05:57:50 Re: Date interval