Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 513C9475E10 for ; Thu, 17 Oct 2002 16:23:00 -0400 (EDT) Received: from lerlaptop.iadfw.net (lerlaptop.iadfw.net [206.66.13.21]) by postgresql.org (Postfix) with ESMTP id CC340475C98 for ; Thu, 17 Oct 2002 16:22:59 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by lerlaptop.iadfw.net (8.12.6/8.12.5) with ESMTP id g9HKMwJR003355; Thu, 17 Oct 2002 15:22:59 -0500 (CDT) (envelope-from ler@lerctr.org) Subject: Re: Messy Casts, Is there a better way? From: Larry Rosenman To: Peter Eisentraut Cc: pgsql-sql@postgresql.org In-Reply-To: References: Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Mailer: Ximian Evolution 1.0.8 Date: 17 Oct 2002 15:22:58 -0500 Message-Id: <1034886179.398.17.camel@lerlaptop.iadfw.net> Mime-Version: 1.0 X-Virus-Scanned: by amavisd-milter (http://amavis.org/) X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200210/198 X-Sequence-Number: 9915 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