[SOLVED] - Simple Date format
Posted: Tue May 25, 2004 7:28 am
Hi,
I have read through some old posts regarding date formatting from MySQL table and also read a bit of the PHP manual.
I cam up with the follwoing that I thought would work.
//The below is my SQL statement to fetch the data and format the date
//Then I output the date to the screen. Hopefully in the format I specified above
Unfortunatly I get no output from the $data[modification_date]
Any help is appreciated.
I have read through some old posts regarding date formatting from MySQL table and also read a bit of the PHP manual.
I cam up with the follwoing that I thought would work.
//The below is my SQL statement to fetch the data and format the date
Code: Select all
$sql = "SELECT tid, title, bodytext, DATE_FORMAT(modification_date,'%d %m %Y'), counter, product FROM tech_notes WHERE tid = '$id'";Code: Select all
echo "<td width="25%">$dataїmodification_date]<br>$dataїproduct]<br>$dataїcounter] views</td>";Any help is appreciated.