I know you can convert a datetime to date onmly but what if you want to compare a datetime field to a date value…? For eg.
$query = "SELECT * FROM Table WHERE date_time = '" . $date . "'"
How would I go about doing this since I have the date but not the time to compare with the datetime field in the database…?
Thanks in advance!
1 Answer