创建mysql下的表格:
CREATE TABLE member(
mid VARCHAR(50) PRIMARY KEY,
password VARCHAR(32) NOT NULL ,
name VARCHAR(30) NOT NULL ,
address VARCHAR(200) NOT NULL ,
telephone VARCHAR(100) NOT NULL ,
zipcode VARCHAR(6) NOT NULL ,
lastdate timestamp DEFAULT now()
);
INSERT INTO member(mid,password,name,address,telephone,zipcode) VALUES ('admin','222','admin','home','0101111','100191');
出现的表格如下:
mysql> select * from member;
+-------+----------+-------+---------+-----------+---------+---------------------+
| mid | password | name | address | telephone | zipcode | lastdate |
+-------+----------+-------+---------+-----------+---------+---------------------+
| admin | 222 | admin | home | 0101111 | 100191 | 2015-07-23 00:53:06 |
+-------+----------+-------+---------+-----------+---------+---------------------+
我不想设置的时间格式为“2015-07-23 00:53:06”,需要的结果是“ 2015-07-23”,
请问,我的格式该怎么设置和修改?