X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 58F29D7CB7 for ; Thu, 10 Nov 2005 17:30:15 -0400 (AST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 59295-05 for ; Thu, 10 Nov 2005 21:30:11 +0000 (GMT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from tigger.fuhr.org (tigger.fuhr.org [63.214.45.158]) by svr1.postgresql.org (Postfix) with ESMTP id 6948DD7115 for ; Thu, 10 Nov 2005 17:30:12 -0400 (AST) Received: from winnie.fuhr.org (winnie.fuhr.org [10.1.0.1]) by tigger.fuhr.org (8.13.3/8.13.3) with ESMTP id jAALUAd4039852 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 10 Nov 2005 14:30:13 -0700 (MST) (envelope-from mfuhr@winnie.fuhr.org) Received: from winnie.fuhr.org (localhost [127.0.0.1]) by winnie.fuhr.org (8.13.4/8.13.4) with ESMTP id jAALU90l061242; Thu, 10 Nov 2005 14:30:09 -0700 (MST) (envelope-from mfuhr@winnie.fuhr.org) Received: (from mfuhr@localhost) by winnie.fuhr.org (8.13.4/8.13.4/Submit) id jAALU91p061241; Thu, 10 Nov 2005 14:30:09 -0700 (MST) (envelope-from mfuhr) Date: Thu, 10 Nov 2005 14:30:09 -0700 From: Michael Fuhr To: Tadej Kanizar Cc: pgsql-sql@postgresql.org Subject: Re: time Message-ID: <20051110213009.GA61211@winnie.fuhr.org> References: <11040.1131650023@sss.pgh.pa.us> <003601c5e62d$06b09600$680aa8c0@Tadejnotebook> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <003601c5e62d$06b09600$680aa8c0@Tadejnotebook> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.006 required=5 tests=[AWL=0.006] X-Spam-Score: 0.006 X-Spam-Level: X-Archive-Number: 200511/98 X-Sequence-Number: 23349 On Thu, Nov 10, 2005 at 08:29:07PM +0100, Tadej Kanizar wrote: > I have a table with a column of type TIMESTAMP. > In output, I need to format it.. what's the best way to do it? > So, for instance, how could I format it so that it would output as YY-MM-DD > HH:MM? See to_char() in the "Data Type Formatting Functions" section of the "Functions and Operators" chapter in the documentation. http://www.postgresql.org/docs/8.0/interactive/functions-formatting.html -- Michael Fuhr