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.
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.
I think you can use CURDATE() to do that. The time will be set to zero IIRC.
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.