Jump to content

Tricky 'GROUP BY' MySQL question


webbgroup

Recommended Posts




mysql> SELECT DATE_FORMAT(\'1997-10-04 22:23:00\', \'%Y-%m-%d\');

+------------------------------------------------+

| DATE_FORMAT(\'1997-10-04 22:23:00\', \'%Y-%m-%d\') |

+------------------------------------------------+

| 1997-10-04                                     |

+------------------------------------------------+

1 row in set (0.00 sec)



mysql> 



 

Use the date_format consistently throughout the query.

 

I think you should read the mysql manual about date functions:

 

http://www.mysql.com/doc/en/Date_and_time_..._functions.html

 

P., denmark

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.