Received: from localhost (unknown [200.46.204.184]) by developer.postgresql.org (Postfix) with ESMTP id E0BB92E008F for ; Thu, 10 Apr 2008 09:32:57 -0300 (ADT) Received: from developer.postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 91892-01-3 for ; Thu, 10 Apr 2008 09:32:47 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from mailserver.ttmail.com (unknown [88.255.235.9]) by developer.postgresql.org (Postfix) with ESMTP id E7A032E008E for ; Thu, 10 Apr 2008 09:32:44 -0300 (ADT) Received: from SMTP2 ([192.168.19.137]) by mailserver.ttmail.com with Microsoft SMTPSVC(6.0.3790.1830); Thu, 10 Apr 2008 15:32:26 +0300 Received: from alamut.mobiliz.com.tr ([213.139.194.86]) by SMTP2 with Microsoft SMTPSVC(6.0.3790.1830); Thu, 10 Apr 2008 15:32:26 +0300 Received: from (unknown [213.139.194.86]) by AVGW-TTMAIL-2.ttmail.com with smtp id 10a8_2b96f928_06fa_11dd_a62e_001422175f0e; Thu, 10 Apr 2008 15:32:25 +0300 From: Volkan YAZICI To: Gavin 'Beau' Baumanis Cc: pgsql-sql@postgresql.org Subject: Re: dateformat issue References: <8817FD2B-5B01-4E3D-9C6D-A6FF165561FB@eclinic.com.au> Date: Thu, 10 Apr 2008 15:37:13 +0300 In-Reply-To: <8817FD2B-5B01-4E3D-9C6D-A6FF165561FB@eclinic.com.au> (Gavin Baumanis's message of "Thu, 10 Apr 2008 10:14:41 +1000") Message-ID: <8763up7uo6.fsf@alamut.mobiliz.com.tr> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-NAI-Spam-Report: 1 Rules triggered * -2.5 -- BAYES_00 -- Bayesian spam probability is 0 to 1% X-OriginalArrivalTime: 10 Apr 2008 12:32:26.0133 (UTC) FILETIME=[EEF6F450:01C89B06] X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200804/67 X-Sequence-Number: 30606 Hi, Gavin 'Beau' Baumanis writes: > I have a question about dates, please. > > I am using Coldfusion and Postgres > I have a function that takes the ate entered in a form and converts it > into an odbc date format. > > So the string ends up being; > {d '2008-04-10'} > > Strangely, the function is used throughout the application and causes > no issues but on one particular template. > And this same templates is replicated for other clients - that > seemingly have no issue . > > > The SQL is simply > > Insert into table (datefield) values ({d '2008-04-10'}) > > Now, I have read the docs and do not see the {d '2008-04-10'} format > as being a valid date data type... > But it works elsewhere in the application / on other sites - thus my > current state of confusion. > > Thanks in advance for any ideas you might have. As others have underlined, "{d '2008-04-10'}" is not a valid SQL timestamp format. I think your query adapter somehow converts it to its appropriate format on the fly. If I were you, to spot the problem, I'd turn query logging on in the server side and see - How does working date queries get passed to the server? - How does bogus query get passed to the server? This details can help you/us to identify the problem. Regards.