Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 84C0E47632C for ; Fri, 24 Jan 2003 12:41:18 -0500 (EST) Received: from leo.pcisys.net (leo.pcisys.net [207.76.102.240]) by postgresql.org (Postfix) with ESMTP id 12C384772D3 for ; Fri, 24 Jan 2003 12:03:15 -0500 (EST) Received: from [192.168.2.15] (moe.rbe45-4.cos.pcisys.net [216.229.45.4]) by leo.pcisys.net (8.12.5/8.12.5) via ESMTP id h0OH3Ziw019807 for ; Fri, 24 Jan 2003 10:03:35 -0700 (MST) env-from (hierophant@pcisys.net) User-Agent: Microsoft-Outlook-Express-Macintosh-Edition/5.0.6 Date: Fri, 24 Jan 2003 10:03:24 -0700 Subject: Re: Date type: DATE From: Keary Suska To: Postgres-PHP Message-ID: In-Reply-To: <01bc01c2c379$f6897d60$6e01a8c0@webdev> Mime-version: 1.0 Content-type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200301/66 X-Sequence-Number: 1811 on 1/24/03 12:26 AM, amiller@hollywood101.com purportedly said: > $date = $year . "-" . $month . "-" . $day; > insert into s_objetivos_caso values ($dni,$date,$cod_s_objetivos,$conn); > > or right in the the query itself... > > insert into s_objetivos_caso values ($dni,$year . "-" . $month . "-" . > $day,$cod_s_objetivos,$conn); > > you would need to check that second way to be sure, but the first one will > work for sure. Neither of these will work, nor any previous suggestion, as date formats are ambiguous and *must* be quoted: $date = $year . "-" . $month . "-" . $day; insert into s_objetivos_caso values ($dni,"'$date'", $cod_s_objetivos,$conn ); This *will* work, at least as far as the date is concerned. Keary Suska Esoteritech, Inc. "Leveraging Open Source for a better Internet"