My query returns the row value as "2/27/2010 12:00:00 AM" but I need to get "2/27/2010". What do I use to get the format as I need it for MySQL?
+3
A:
Use:
SELECT DATE_FORMAT(your_date_column, '%c/%d/%Y') FROM table
Piotr Pankowski
2010-05-10 11:34:56
goog thankshow to use this in in insert query
Ayyappan.Anbalagan
2010-05-10 12:49:59
if column type is date/datetime/timestamp all you have to do is:UPDATE table SET date_column = NOW()If you need special formatting:UPDATE table SET date_column = DATE_FORMAT(NOW(), '%c/%d/%Y')
Piotr Pankowski
2010-05-10 13:16:18
+2
A:
use the date_format function. This site will help you show you how to format the date http://www.mysqlformatdate.com
Gerard
2010-05-10 11:41:18