Mysql-如何从表中获取唯一的dd-mm-YY?
结构表:Mysql-如何从表中获取唯一的dd-mm-YY?,mysql,Mysql,结构表: date text 2014-11-01 12:23 test words 2014-11-01 12:23 test words 2014-11-02 12:23 test words 2014-11-01 12:23 test words 2014-11-03 12:23 test words 2014-11-01 12:23 test words 2014-11-04 12:23 test words 2014-11
date text
2014-11-01 12:23 test words
2014-11-01 12:23 test words
2014-11-02 12:23 test words
2014-11-01 12:23 test words
2014-11-03 12:23 test words
2014-11-01 12:23 test words
2014-11-04 12:23 test words
2014-11-04 12:23 test words
2014-11-07 12:23 test words
SELECT * FROM TABLE GROUP by date
但此查询无法获取格式为dd-mm-YY的唯一日期
请告诉我如何从该表中获取唯一日期dd mm YY?
附言:结果应该是下一个:
尝试使用
distinct
SELECT distinct DATE(date) FROM table;
**尝试使用
不同的
和日期格式
**
表格:-
查询:-
结果:-
SELECT DISTINCT DATE(date) FROM table;
SELECT distinct DATE(date) FROM table;
user_id email db_add_date
1 l@gmail.com 2014-05-14 03:09:17
2 a@gmail.com 2014-05-21 08:21:00
3 b@gmail.com 2014-05-21 08:21:00
4 c@gmail.com 2014-05-21 08:21:00
SELECT
DISTINCT DATE_FORMAT(db_add_date,'%d-%m-%Y') AS date
FROM table
date
14-05-2014
21-05-2014