Re: Insterting date in an MySQL table
| From: | Torsten Roehr | Date: | Thu, 06 May 2004 10:23:02 +0000 |
| Subject: | Re: Insterting date in an MySQL table | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-34281@lists.php.net to get a copy of this message | ||
"Charalambos Nicolaou" <npambos@hotmail.com> wrote in message
news:Sea2-F51gPugu3WOXs8000032dc@hotmail.com...
> Hi everyone,
>
> I want to created a MYSQL table which will get the date in the form
> (YYYY-MM-DD) automatically. I have created the table below but it doesnt
> get the form of date that I want. It has the form (YYYYMMDDHHMMSS)
>
> CREATE TABLE questions1 (ID INT NOT NULL AUTO_INCREMENT,name
VARCHAR(30),day
> TIMESTAMP,question TEXT,email VARCHAR(30),answer TEXT, PRIMARY KEY(ID));
>
> Is there any other date field that gets the date form as I want?
Use the column type date - this is what you want.
Regards, Torsten
>
> Thanks in advance
>
> Charalambos Nicolaou
>
> _________________________________________________________________
> MSN 8 with e-mail virus protection service: 2 months FREE*
> http://join.msn.com/?page=features/virus