hakeem777 Posted August 4, 2010 Share Posted August 4, 2010 I understand after running now() function in an SQL statement, I will get current date/time like following in mysql browser: '2010-08-04 17:01:06' If I want the returned value to be '2010-08-04 00:00:00'. How can I do? Thanks. Quote Link to comment Share on other sites More sharing options...
bh Posted August 4, 2010 Share Posted August 4, 2010 Hi, You can use DATE_FORMAT(date, format). Eg. like this: SELECT DATE_FORMAT(NOW(), '%Y-%m-%d 00:00:00'); Quote Link to comment Share on other sites More sharing options...
Mchl Posted August 4, 2010 Share Posted August 4, 2010 CURDATE() Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.