Received: from localhost (unknown [200.46.204.184]) by developer.postgresql.org (Postfix) with ESMTP id 303082E004F for ; Thu, 10 Apr 2008 03:41:50 -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 66324-06 for ; Thu, 10 Apr 2008 03:41:43 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from mail.eclinic.com.au (mail.eclinic.com.au [203.202.134.251]) by developer.postgresql.org (Postfix) with ESMTP id BD6ED2E0047 for ; Thu, 10 Apr 2008 03:41:45 -0300 (ADT) Received: from mail.eclinic.com.au (preston [127.0.0.1]) by mail.eclinic.com.au (Postfix) with ESMTP id CC16B1000A03; Thu, 10 Apr 2008 16:41:34 +1000 (EST) Received: from mail.eclinic.com.au (preston [127.0.0.1]) by mail.eclinic.com.au (Postfix) with ESMTP id B35BC1000992; Thu, 10 Apr 2008 16:41:34 +1000 (EST) Received: from [119.11.70.161] (unknown [119.11.70.161]) by mail.eclinic.com.au (Postfix) with ESMTP id 758C81000976; Thu, 10 Apr 2008 16:41:33 +1000 (EST) Cc: pgsql-sql@postgresql.org Message-Id: From: Gavin 'Beau' Baumanis To: aarni@kymi.com In-Reply-To: <200804100917.33729.aarni@kymi.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Apple Message framework v919.2) Subject: Re: dateformat issue Date: Thu, 10 Apr 2008 16:41:29 +1000 References: <8817FD2B-5B01-4E3D-9C6D-A6FF165561FB@eclinic.com.au> <200804100917.33729.aarni@kymi.com> X-Mailer: Apple Mail (2.919.2) X-AV-Checked: ClamAV using ClamSMTP X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200804/63 X-Sequence-Number: 30602 Hi Aarni, just so you know I am using the CF built-in function, createodbcdate here is the info from livedocs. CreateODBCDate Description Returns a date in ODBC date format. Category Date and time functions Syntax CreateODBCDate(date) so I pass in 2008-01-23 and I get back {d '2008-01-23'} The weirdness for me is that it works elsewhere in the application, I =20= am really stumped. -Gavin. On 10/04/2008, at 4:17 PM, Aarni Ruuhim=E4ki wrote: > On Thursday 10 April 2008 03:14, Gavin 'Beau' Baumanis wrote: >> Hi Everyone, >> >> 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 =20= >> 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'}) >> > > Hi, > > The above is not a valid value for a date field. What function do =20 > you use for > the conversion ? > > #DateFormat(form.date, "YYYY-MM-DD")# ? Or perhaps a custom function / > conversion script ? > > Which client (browser?) / platform produces the error ? > > And just out of general interest, which cf-version and platform are =20= > you > using ? Pg version ? > > I use pg 8.x's on CentOS and Fedora with CF 5 Pro Linux and CFMX7 =20 > Standard. I > also heard that CFMX7+ would install and run ok on Ubuntu. > > Best regards, > > --=20 > Aarni Ruuhim=E4ki > --- > Burglars usually come in through your windows. > --- > > --=20 > Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-sql Please contact me if you should have any questions. Gavin 'Beau' Baumanis Senior Application Developer PalCare Pty. Ltd. E: beau@palcare.com.au T: +61 -3 9318 4567 M: +61 -4 38 545 586 W: http://www.palcare.com.au