pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Gnugeek <gnugeek@comcast.net>
To: pgsql-sql@postgresql.org
Subject: Re: Date / interval question
Date: Thu, 19 Feb 2004 16:04:22 -0500
Message-ID: <403524D6.5060706@comcast.net> (raw)
In-Reply-To: <FKEOIJEHOIKIOEHCGNCLIENGEDAA.jer@highboard.com>
References: <FKEOIJEHOIKIOEHCGNCLIENGEDAA.jer@highboard.com>



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



Message-ID: <403524D6.5060706@comcast.net>
Permalink:  ../403524D6.5060706@comcast.net/
Also on:    postgresql.org/message-id/403524D6.5060706@comcast.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: gnugeek@comcast.net
  Subject: Re: Date / interval question
  In-Reply-To: <403524D6.5060706@comcast.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox