I am unable to assign only date to a php variable from datetime field of a MySQL table. I am using PHP 4, I know how to do it in PHP 5.
datetime
Can
Do it directly in MySQL:
select DATE_FORMAT('2012-12-24 12:13:14', '%Y/%m/%d')
So your query will look like this:
SELECT DATE_FORMAT(Invdate, '%Y/%m/%d') FROM INVHDR WHERE Invdate BETWEEN '$startdat' AND '$enddat'