Hello all,
I'm working on a website for my grandmother's quilting business, and I can't figure out how to change the date format to what she wants.
Right now, the following script pulls out the next three events from my SQL table and then displays them as: Datetime - Event Name (of course, with the appropriate information). Everything works GREAT on it, but she doesn't like the date format. She wants it to display the month and date only (i.e. July 22). How do I convert my current datetime format (normal mySQL datetime format) to the month and date?
Here is my script:
<?php
$currentdate = date('Y-m-d H:i:u');
$result = mysql_query("SELECT * FROM `classes` WHERE `datetime` >= '$currentdate' ORDER BY `datetime` ASC LIMIT 0 , 3");
while ($array = mysql_fetch_array($result))
{
$datetime = $array['datetime'];
$name = $array['name'];
echo "<b>$datetime -</b><i>$name</i><br>";
}
?>
Thanks in advance for any help!
~ Cheez