Haneef Puttur

Extract only date from mysql datetime column in mysql

Problem :

Mysql database has datetime field and i want to get only date. 

Solution :

SELECT CAST(`datetime_field` AS DATE) AS dateonly FROM etc….

Exit mobile version