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 - sscanf() double showing zeros -

pentaho - Carte Status / Kettle Slave Server Status page shows status for random runs instead of the latest run -