Re: Messy Casts, Is there a better way?

From: Larry Rosenman <ler(at)lerctr(dot)org>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Messy Casts, Is there a better way?
Date: 2002-10-17 20:22:58
Message-ID: 1034886179.398.17.camel@lerlaptop.iadfw.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)gmx(dot)net
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo(at)postgresql(dot)org
>
--
Larry Rosenman http://www.lerctr.org/~ler
Phone: +1 972-414-9812 E-Mail: ler(at)lerctr(dot)org
US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Marten Feldtmann 2002-10-17 20:46:34 Re: object oriented vs relational DB
Previous Message Richard Huxton 2002-10-17 18:42:50 Re: object oriented vs relational DB