mysql - SELECT DATE_FORMAT(NOW(),'%m-%d-%Y') in php is not working well -


can me this:

$querydate ="select date_format(now(),'%m-%d-%y') dat"; $query = mysql_query($querydate); $row = mysql_fetch_assoc($query); $fecha =  $row['dat']; 

-2013-31+07 returning -2037

and want return today's date

31-07-2013 

try

select date_format(now(),'%d-%m-%y') dat 

here have more info format of date


Comments

Popular posts from this blog

c++ - Creating new partition disk winapi -

Android Prevent Bluetooth Pairing Dialog -

VBA function to include CDATA -