beginners
08-19-2005, 03:08 AM
Hi
My current date format display from MySQL database extraction is dd/mm
i.e. 18/8, 20/8, 23/8, 3/9, 8/9, 3/10, 9/10, ....
I am wondering if I can change the date format display to be as:
Aug 18, 20, 23
Sept 3, 8
Oct 3, 9
Any help is greatly appreciated.
<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);
?>
My current date format display from MySQL database extraction is dd/mm
i.e. 18/8, 20/8, 23/8, 3/9, 8/9, 3/10, 9/10, ....
I am wondering if I can change the date format display to be as:
Aug 18, 20, 23
Sept 3, 8
Oct 3, 9
Any help is greatly appreciated.
<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);
?>