Jump to content

date format


pietbez

Recommended Posts

can anyone help please?

i want to output my date in this format "wed 1 Oct 2008"

at the moment this is what i have  "2008-10-01"

 

i dont know how to work the changes into my script..

 

<?
include('../qazwsxedc/config.php');

mysql_connect($server,$username,$password);
@mysql_select_db($database) or die ("Unable to connect to the database");

$id=$_POST['id'];
$yesterday = date('Y-m-d', mktime(0, 0, 0, date("m") , date("d") - 1, date("Y")));
$do=mysql_query ("SELECT c.id, c.venue_name, c.event_date, v.town 
                    FROM calendar_events c
                        INNER JOIN venues v ON c.venue_name = v.venue
                    WHERE c.status='confirmed'and c.event_type='gig'and c.event_date >'$yesterday' ORDER by c.event_date ASC ");
$x=mysql_num_rows($do);
if ($x>0) {
while ($row = mysql_fetch_array($do, MYSQL_ASSOC)) {
  $name.=$row["venue_name"].','.$row["event_date"].','.$row["town"];
  $name.='|';
  $ids.=$row["id"].'|';

}
;}
echo "&total=".$x."&header=".$name."&ids=".$ids;
?>

Link to comment
https://forums.phpfreaks.com/topic/126589-date-format/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.