Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 81680476F89 for ; Thu, 23 Jan 2003 10:12:36 -0500 (EST) Received: from jive.SoftHome.net (jive.SoftHome.net [66.54.152.27]) by postgresql.org (Postfix) with SMTP id 8B4D54769F0 for ; Thu, 23 Jan 2003 10:09:59 -0500 (EST) Received: (qmail 818 invoked by uid 417); 23 Jan 2003 15:10:02 -0000 Received: from shunt-smtp-out-0 (HELO softhome.net) (172.16.3.12) by shunt-smtp-out-0 with SMTP; 23 Jan 2003 15:10:02 -0000 Received: from supercable ([217.216.221.248]) (AUTH: LOGIN adriantineo@softhome.net) by softhome.net with esmtp; Thu, 23 Jan 2003 08:09:57 -0700 Message-ID: <001f01c2c2f1$9255d240$f8ddd8d9@supercable.es> From: "Adrian Tineo" To: pgsql-php@postgresql.org References: <200301230150.h0N1ofh20670@smtp.wanadoo.es> Subject: Re: Date type: DATE Date: Thu, 23 Jan 2003 16:10:22 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200301/52 X-Sequence-Number: 1797 > $date="$year-$month-$day"; > insert into s_objetivos_caso values ($dni,$date,$cod_s_objetivos,$conn); By default, postgresql uses "ISO with US(NonEuropean) conventions" for the date, wich means mm/dd/yyyy. You can check that with "show datestyle". Of course, you can change the convention to a European one like dd/mm/yyyy but I don't know how to make it permanent.... anyway, if we stick to the default US convention you would do something like: $date=$month ."/". $day ."/" $year; // Use the dot (.) to join strings And then do the insert. Adrian Tineo