"Campbell, Lance" <[email protected]> writes:
> I want to subtract to dates to know the number of days different.
> Example:
> 01/02/2010 - 01/01/2010 = 1 day
> 08/01/2010 - 07/31/2010 = 1 day
> How do I do this? 

If they're dates, you just subtract.

regression=# select '08/01/2010'::date - '07/31/2010'::date;
 ?column? 
----------
        1
(1 row)


                        regards, tom lane

-- 
Sent via pgsql-sql mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql

Reply via email to