w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
How to convert a mysql datetime column to just date?

You can use the date_format function for mysql

select * from alerts_to_send where date_format(date_to_send,
"%m/%d/%Y") = date_format(now(), "%m/%d/%Y")

Here is reference to date_format: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html#function_date-format

© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.