pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Larry Rosenman <ler@lerctr.org>
To: Peter Eisentraut <peter_e@gmx.net>
Cc: pgsql-sql@postgresql.org
Subject: Re: Messy Casts, Is there a better way?
Date: 17 Oct 2002 15:22:58 -0500
Message-ID: <1034886179.398.17.camel@lerlaptop.iadfw.net> (raw)
In-Reply-To: <Pine.LNX.4.44.0210152041150.928-100000@localhost.localdomain>
References: <Pine.LNX.4.44.0210152041150.928-100000@localhost.localdomain>

On Tue, 2002-10-15 at 13:54, Peter Eisentraut wrote:
> Larry Rosenman writes:
> 
> > I have a table with the following, in part:
> >
> > contract_start date
> > contract_term  int (term in MONTHS)
> 
> Store contract_term as interval?
If I do that, and enter '72 months' in the contract_term field, how can
I convince PostgreSQL to output the interval back in months?  It wants
to give me '5 Years'.  

I can't seem to find a function for that.


> 
> -- 
> Peter Eisentraut   peter_e@gmx.net
> 
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
> 
-- 
Larry Rosenman                     http://www.lerctr.org/~ler
Phone: +1 972-414-9812                 E-Mail: ler@lerctr.org
US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749




view thread (6+ messages)  latest in thread

Message-ID: <1034886179.398.17.camel@lerlaptop.iadfw.net>
Permalink:  ../1034886179.398.17.camel@lerlaptop.iadfw.net/
Also on:    postgresql.org/message-id/1034886179.398.17.camel@lerlaptop.iadfw.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: ler@lerctr.org, peter_e@gmx.net
  Subject: Re: Messy Casts, Is there a better way?
  In-Reply-To: <1034886179.398.17.camel@lerlaptop.iadfw.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