Re: Dates

From: Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com>
To: MaRCeLO PeReiRA <gandalf_mp(at)yahoo(dot)com(dot)br>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Dates
Date: 2004-02-16 19:52:17
Message-ID: 20040216114945.M17377@megazone.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


On Mon, 16 Feb 2004, [iso-8859-1] MaRCeLO PeReiRA wrote:

> "I need to know the difference, in days, between two
> dates."

I think date difference will work, so maybe something like:
CURRENT_DATE - mydate
which should return an integer.

> SELECT date_part('day', age(now(), mydate));

In response to

  • Dates at 2004-02-16 19:01:58 from MaRCeLO PeReiRA

Browse pgsql-general by date

  From Date Subject
Next Message Andrew Rawnsley 2004-02-16 19:53:13 Re: Dates
Previous Message Brandon Craig Rhodes 2004-02-16 19:31:09 Re: using a .postgresql/root.crt