Reputation: 11961
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.
Upvotes: 3
Views: 18104
Reputation: 1856
This woked for me like perdfect:
SELECT * FROM table WHERE DATE(myDate) = DATE(NOW())
Upvotes: 1
Reputation: 488
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 |
+------------+
Upvotes: 0
Reputation: 9736
This MySQL select should return the date without the time.
SELECT CURRENT_DATE();
enjoy :)
Upvotes: 2
Reputation: 500
I think this might also work
SELECT CONVERT(VARCHAR(10),GETDATE(),111)
Upvotes: 2