Page 1 of 1

How to write a mysql query for php that look at a date/time

Posted: Thu Oct 01, 2009 9:54 pm
by edawson003
How can I write a mysql query for php that will look at a date/time store field as just date() without the hours and minutes. The conventional CONVERT() doesn't seem to jive with PHP..unless my syntax is off. Any thoughts?

Re: How to write a mysql query for php that look at a date/time

Posted: Thu Oct 01, 2009 10:23 pm
by requinix
Tried DATE()?

(Capitalized. Means it's a MySQL function.)

Re: How to write a mysql query for php that look at a date/time

Posted: Thu Oct 01, 2009 11:22 pm
by mybikeisgreen
database questions don't belong in this forum, do they?

Have you tried using

LEFT(`fieldname`, 10)

?