pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jesus Rios <galiza-vermelha@wanadoo.es>
To: POSTGRESLQ-PHP <pgsql-php@postgresql.org>
Subject: Date type: DATE
Date: Wed, 22 Jan 2003 19:59:15 +0100
Message-ID: <200301230150.h0N1ofh20670@smtp.wanadoo.es> (raw)


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. 



view thread (6+ messages)  latest in thread

Message-ID: <200301230150.h0N1ofh20670@smtp.wanadoo.es>
Permalink:  ../200301230150.h0N1ofh20670@smtp.wanadoo.es/
Also on:    postgresql.org/message-id/200301230150.h0N1ofh20670@smtp.wanadoo.es

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-php@postgresql.org
  Cc: galiza-vermelha@wanadoo.es
  Subject: Re: Date type: DATE
  In-Reply-To: <200301230150.h0N1ofh20670@smtp.wanadoo.es>
  References: <200301230150.h0N1ofh20670@smtp.wanadoo.es>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox