Problem w/ date calculation. - Mailing list pgsql-general

From Mike Diehl
Subject Problem w/ date calculation.
Date
Msg-id 20021106201818.72BE555A9@dominion.dyndns.org
Whole thread Raw
List pgsql-general
Hi all,

I'm having a problem with a date calculation.  I'm trying to get a list of
all records who's "last_backed_up" field indicates one day or older.

But, I'm doing something wrong with age().

For example, if the current date is:
mapping=# select now();
             now
------------------------------
 2002-11-06 16:16:09.62247-07
(1 row)

Then the age of a field containing 2002-11-05 17:25:33.89754-07 should be
about 23 hours, right?

Well:
mapping=# select age(timestamp '2002-11-05 17:25:33.89754-07');
      age
----------------
 06:34:26.10246
(1 row)

What am I missing?

TIA.

--
Mike Diehl
Network Tools Devl.
SAIC at Sandia Labs
(505) 284-3137

pgsql-general by date:

Previous
From: kylechihchen@netscape.net (Kyle Cheng)
Date:
Subject: Question about Vacuum, Index, perfromance, future xml support in postgresql
Next
From: Benjamin Scherrey
Date:
Subject: Re: Changing max size of attribute names.