X-Original-To: pgsql-sql-postgresql.org@postgresql.org Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id 19A489FB279 for ; Tue, 22 Aug 2006 10:28:05 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 04131-04 for ; Tue, 22 Aug 2006 13:27:50 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey- Received: from lists.commandprompt.com (host-130.commandprompt.net [207.173.203.130]) by postgresql.org (Postfix) with ESMTP id 89EAB9FB348 for ; Tue, 22 Aug 2006 10:27:50 -0300 (ADT) Received: from alvh.no-ip.org (201-221-200-187.bk11-dsl.surnet.cl [201.221.200.187]) (authenticated bits=0) by lists.commandprompt.com (8.13.7/8.13.6) with ESMTP id k7MDRll6006235; Tue, 22 Aug 2006 06:27:47 -0700 Received: by alvh.no-ip.org (Postfix, from userid 1000) id 870A8C2DC58; Tue, 22 Aug 2006 09:27:05 -0400 (CLT) Date: Tue, 22 Aug 2006 09:27:05 -0400 From: Alvaro Herrera To: "Penchalaiah P." Cc: pgsql-sql@postgresql.org Subject: Re: to get DD-MM-YYYY format of data Message-ID: <20060822132705.GL14368@alvh.no-ip.org> Mail-Followup-To: "Penchalaiah P." , pgsql-sql@postgresql.org References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.12-2006-07-14 X-Virus-Scanned: ClamAV version 0.88.3, clamav-milter version 0.88.3 on projects.commandprompt.com X-Virus-Status: Clean X-Greylist: Sender succeded SMTP AUTH authentication, not delayed by milter-greylist-1.6 (lists.commandprompt.com [192.168.2.159]); Tue, 22 Aug 2006 06:27:48 -0700 (PDT) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=3.951 tagged_above=0 required=5 tests=FORGED_RCVD_HELO, SPF_HELO_SOFTFAIL, SPF_SOFTFAIL X-Spam-Level: *** X-Archive-Number: 200608/154 X-Sequence-Number: 26112 Penchalaiah P. wrote: > I am using date is data type to one of the field in my table....but when > ever I am passing values to that field it is taking yyy-mm-dd format.. > > But I don't want like that .. I need like this DD-MM-YYYY.. for this wt > I have to do... Read the documentation on the "DateStyle" parameter, noticing that it controls two things at once, input and output of dates. You may also use to_char() or extract() to format the date manually without messing with the configuration. -- Alvaro Herrera http://www.CommandPrompt.com/ The PostgreSQL Company - Command Prompt, Inc.