Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Formatting Date within a MySQL query?

Status
Not open for further replies.

NigeB

Technical User
Nov 29, 2000
53
GB
Below is listed a simply query that is integrated within a web page, the
problem I have is that the 3rd %s I wish to display as the month name, the
data_updated field is a timestamp, I just need a little help on how or where
to put the DATE_FORMAT or MONTHNAME criteria within the query.

Any help would be greatly appreciated.

Nige.

MySQL query__________________________

echo &quot;<table width=100% border=0>\n&quot;;

while ($myrow = mysql_fetch_array($result)){

printf(&quot;<tr><td align=left><a href=%s><b><font size=3>%s</font></b></a>
%s</td></tr>
<tr><td align=left><b><i>%s</i></b><td>
</tr>\n&quot;, $myrow[&quot;url&quot;], $myrow[&quot;headline&quot;],
$myrow[&quot;data_updated&quot;],$myrow[&quot;details&quot;]);

}

echo &quot;</table>\n&quot;;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top