Re: Date / interval question

From: Gnugeek <gnugeek(at)comcast(dot)net>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: Date / interval question
Date: 2004-02-19 21:04:22
Message-ID: 403524D6.5060706@comcast.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

I'm looking for a way, within SQL, given a starting date and an ending
date, to get back the number of months between the start and end date.
If I "SELECT end_date - start_date", I get back an interval in days; I
need months.

Thanks for any suggestions,
Brian

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Brian Knox 2004-02-19 21:06:09 Re: DISTINCT ON troubles
Previous Message Richard Huxton 2004-02-19 20:49:09 Re: Compiling pl/pgsql functions