Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 518014770C3 for ; Fri, 24 Jan 2003 01:41:22 -0500 (EST) Received: from www.applecomm.net (www.applecomm.net [210.80.130.210]) by postgresql.org (Postfix) with ESMTP id 44375477104 for ; Fri, 24 Jan 2003 01:05:52 -0500 (EST) Received: from crap.internal ([202.59.104.221]) by www.applecomm.net (8.10.2/8.10.2) with ESMTP id h0O5o6E07100; Fri, 24 Jan 2003 16:50:06 +1100 Received: from localhost (localhost [127.0.0.1]) by crap.internal (Postfix) with ESMTP id 3BE6F13A52C; Fri, 24 Jan 2003 01:10:13 -0500 (EST) Received: from mathewslaptop (mathews.internal [192.168.0.33]) by crap.internal (Postfix) with SMTP id 9E21A13A52C; Fri, 24 Jan 2003 01:10:11 -0500 (EST) Message-ID: <001b01c2c36e$9f8975c0$2100a8c0@mathewslaptop> From: "Mathew Dredge" To: "Jesus Rios" , "POSTGRESLQ-PHP" References: <200301230150.h0N1ofh20670@smtp.wanadoo.es> Subject: Re: Date type: DATE Date: Fri, 24 Jan 2003 17:05:40 +1100 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-Scanned-By: AMaViS at Ideal Software Solutions X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200301/61 X-Sequence-Number: 1806 Try putting single quotes around the date, this works for me.. insert into s_objetivos_caso values ($dni,'$date',$cod_s_objetivos,$conn); ----- Original Message ----- From: "Jesus Rios" To: "POSTGRESLQ-PHP" Sent: Thursday, January 23, 2003 5:59 AM Subject: [PHP] Date type: DATE > > Hi everybody. > > I've got a form where I ask for the date.I store the date in 3 variables: for > the day i have $day (dd), for the month i have $month (mm) and for the year > $year (yyyy). > At the same time i have a table which is as it follows: > Table "s_objetivos_caso" > Column | Type | Modifiers > -----------------+---------+----------- > dni | integer | not null > fecha | date | not null > cod_s_objetivos | integer | not null > > How do i have to insert the column date?. > > $date="$year-$month-$day"; > insert into s_objetivos_caso values ($dni,$date,$cod_s_objetivos,$conn); > > Can anyboy help me for how a i must format the date for introduce into the > table??? > > > Thank you. And sorry with my English. > > ---------------------------(end of broadcast)--------------------------- > TIP 3: if posting/reading through Usenet, please send an appropriate > subscribe-nomail command to majordomo@postgresql.org so that your > message can get through to the mailing list cleanly >