How to change month display ?
Posted by:
Edward Han
Date: August 19, 2005 08:26PM
Hi
My current display format is: Show date: 1/7, 5/7, 17/7, 3/8, 4/8, 9/8, 15/8, 8/9, ...
Need to change it to display as: Show date: Jul 1, 5, 17
Aug 3, 4, 9, 15
Sep 8 ....
Any sample how I can convert the display is greatly appreciated. Here is my current coding:
<span class="content"><b>Show dates:
<?
$query1 = "select DAYOFMONTH(ShowDate) as showday, MONTH(ShowDate) as showmon from Schedule where Timetable = '".$arr["Name"]."' and EndDate = '00000000' and ShowDate >= '".date("Ymd")."') order by ShowDate";
$result1 = mysql_query($query1,$dbConnect);
$comma=0;
while ($rs=mysql_fetch_array($result1)){
print " ".$rs["showday"]."/".$rs["showmon"];
$comma = $comma+1;
if($comma<mysql_num_rows($result1)) echo", ";
else echo".";
}
mysql_free_result($result1);
?>