Re: Messy Casts, Is there a better way? - Mailing list pgsql-sql

From Larry Rosenman
Subject Re: Messy Casts, Is there a better way?
Date
Msg-id 1034886179.398.17.camel@lerlaptop.iadfw.net
Whole thread Raw
In response to Re: Messy Casts, Is there a better way?  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: Messy Casts, Is there a better way?
List pgsql-sql
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



pgsql-sql by date:

Previous
From: Richard Huxton
Date:
Subject: Re: object oriented vs relational DB
Next
From: "Josh Berkus"
Date:
Subject: Re: Messy Casts, Is there a better way?