Hey ya'll sorry for all the caps in the title, but its actually suppose to be like that.
I am running this in query
SELECT NOW()
and it returns this
2012-05-14 17:35:37
how do I remove the time, I only want the date.
Hey ya'll sorry for all the caps in the title, but its actually suppose to be like that.
I am running this in query
SELECT NOW()
and it returns this
2012-05-14 17:35:37
how do I remove the time, I only want the date.
This MySQL select should return the date without the time.
SELECT CURRENT_DATE();
enjoy :)
This woked for me like perdfect:
SELECT * FROM table WHERE DATE(myDate) = DATE(NOW())
You can also create a date format and use NOW()
.
| date_int | date | YES | | NULL | |
+----------+--------------+------+-----+---------+-------+
mysql> UPDATE borderaux SET date_int = NOW();
+------------+
| date_int |
+------------+
| 2013-07-15 |
+------------+