Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id AE70B2E2E5D for ; Thu, 24 Jan 2008 11:50:28 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 04642-01-7 for ; Thu, 24 Jan 2008 11:50:22 -0400 (AST) Received: from nz-out-0506.google.com (nz-out-0506.google.com [64.233.162.227]) by postgresql.org (Postfix) with ESMTP id 13F642E3ADB for ; Thu, 24 Jan 2008 11:41:56 -0400 (AST) Received: by nz-out-0506.google.com with SMTP id l8so194432nzf.28 for ; Thu, 24 Jan 2008 07:41:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=GjQN7kaY5LO1dLhMjwHdIq9AKCQunuGLvOzlyZJwMiE=; b=VcSmlTRM2zI0G64AZ3HDy+YFA2ip5rsM1+AD6aS4uJHmF0eCLtGLImxbi04gEsfRHvyePfBHd3+/tMXYF8Pkfvd4SYjRySJlHYH/7I/VGVC+GpEeTPs+nT8Wa5KtEsvrrRkPNmZGPAL3M/gRKRI3P4ENF0PdmrM2E0D8CDzqcik= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=ZlUvfUM/Gjkt3BOGaJyUOStSj+1zkF1x8+0k2jrqAflnmroY3HlWZnLvN47rlMwvS60T4BpDcOQ/JaNb+Zkv7iISj6pvTq4teSoWPT1E+zJNJco/wiIWhqkE57G8shxzwyFqwPjVWYwEDGPQnFO+ub8w8oFQeT9+WkPo6zfMDHc= Received: by 10.115.22.1 with SMTP id z1mr929996wai.48.1201189315179; Thu, 24 Jan 2008 07:41:55 -0800 (PST) Received: by 10.114.133.5 with HTTP; Thu, 24 Jan 2008 07:41:55 -0800 (PST) Message-ID: Date: Thu, 24 Jan 2008 09:41:55 -0600 From: "Scott Marlowe" To: iuri.sampaio@computer.org Subject: Re: date format Cc: pgsql-sql@postgresql.org In-Reply-To: <1201162018.7883.12.camel@COMPAQ> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <1201162018.7883.12.camel@COMPAQ> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200801/183 X-Sequence-Number: 30036 On Jan 24, 2008 2:06 AM, iuri de araujo sampaio wrote: > hi, > > how to change the default format for type date? > I have created a field on a table: > > ## > create table tbl_inventory ( > item_id integer constraint c_pk primary key, > I. purchase_date date, > II. fabrication_date date, > III. expiration_date date > ); > ## > > the error i got is: > > ## > Database operation "dml" failed > (exception ERROR, "ERROR: invalid input syntax for type date: "2008 7 22 {} {} {} {DD MONTH YYYY}" > ") > ## Can you give us a statement by statement example of what you're doing? Are you actually trying to insert the string '2008 7 22 {} {} {} {DD MONTH YYYY}' as a date?