Compare timestamp dates with date-only in Mysql

To get record for specific day with Date format Y-m-d and  record store in Database with time stamp format than use DATE() function to extract the date portion of the time-stamp.



i.e.
SELECT * FROM table
WHERE DATE(column name) = '2012-05-05'

Post a Comment

0 Comments