Received: from localhost (unknown [200.46.204.184]) by developer.postgresql.org (Postfix) with ESMTP id EA9532E003D for ; Thu, 10 Apr 2008 08:19:53 -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 72428-02 for ; Thu, 10 Apr 2008 08:19:40 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.158]) by developer.postgresql.org (Postfix) with ESMTP id 582B32E0037 for ; Thu, 10 Apr 2008 08:19:46 -0300 (ADT) Received: by fg-out-1718.google.com with SMTP id 22so2460794fge.23 for ; Thu, 10 Apr 2008 04:19:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:user-agent:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding; bh=/gJINPhe/w5Lnta85Lh/KVkVdlDCsZBqFJ/s1ERalGw=; b=hoCgy9RlDNsT1bbAvD3qamoyvWDgUM8ee5iP7vIq0UXzlw6olIyMc82mtleTQeTWm3JmmXKM82v6w0s45Ps8TQ4Kgk+ivnitFhGnIVog+rY2vcRPt6I8Vywzu2SBVJOJZOWqCdAyw0eCYA0XkFchVso0WvbRnWBNReml8KTXU4A= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding; b=ApxWHhtsreaegbPCS7LxYoQ5YfD+8+B5qfyEC1n0mJjOGv42GOzeuMRqMwIhH6J5AT7BQwtHJqD6B17Gr/ObVdnr+srEiU1Mi4AxyIl9rjHaphC/vhpbgFcKomapWlPe9hhN+MR9w8CvuGARduYKcsiRXUhOFbtEDRmQr6yqWFA= Received: by 10.86.84.5 with SMTP id h5mr2822135fgb.53.1207826384590; Thu, 10 Apr 2008 04:19:44 -0700 (PDT) Received: from ?192.168.1.5? ( [87.222.7.173]) by mx.google.com with ESMTPS id d4sm1260761fga.2.2008.04.10.04.19.42 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 10 Apr 2008 04:19:43 -0700 (PDT) Message-ID: <47FDF7CE.3090909@gmail.com> Date: Thu, 10 Apr 2008 13:19:42 +0200 From: Tk421 User-Agent: Thunderbird 2.0.0.12 (Windows/20080213) MIME-Version: 1.0 To: Gavin 'Beau' Baumanis CC: pgsql-sql@postgresql.org Subject: Re: dateformat issue References: <8817FD2B-5B01-4E3D-9C6D-A6FF165561FB@eclinic.com.au> In-Reply-To: <8817FD2B-5B01-4E3D-9C6D-A6FF165561FB@eclinic.com.au> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.418 tagged_above=0 required=5 tests=AWL=0.418 X-Spam-Level: X-Archive-Number: 200804/65 X-Sequence-Number: 30604 Gavin 'Beau' Baumanis escribió: > 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 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. > > > > 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 > I had some similar probles with dates, and i solved it using a string format (yyyymmdd) to set date format, and two functions (toString and toDate) made by myself inf the necesary language (asp, php, jsp....) This format is full valid for comparations (>, <, =) and orders in SQL. The only problem is to work in your application, but it may be solved with some functions