Jump to content

Date output, Need help!

Go to solution Solved by Barand,

Recommended Posts

So I have a huge problem with probably a simple solution. But after hours of searching on google I gave up.

Here is my problem...


I have a date in my phpmyadmin that output like this 2014-01-20 but I want it to output like this 20 January, 2014.

It's "event_startdate" and "event_enddate" that I want to change.


Here is my code... 

$event_list = "";

$sql = mysql_query ("SELECT * FROM events ORDER BY event_startdate ASC");
$eventCount = mysql_num_rows($sql); // Count number of rows to outpout.
if($eventCount > 0){
	while($row = mysql_fetch_array($sql)){
		$id = $row["id"];
		$event_name = $row["event_name"];
		$event_startdate = $row["event_startdate"];
		$event_enddate = $row["event_enddate"];
		$event_place = $row["event_place"];
		$event_list .= '
		<div class="eventlistpage">
			<a href="event.php?id=' . $id .'">
				<p id="eventNameBox">' . $event_name . '</p>
				<p>' . $event_startdate . '</p>
				<p>' . $event_enddate . '</p>
				<p>' . $event_place . '</p>
			<div class="clear"></div>
} else {
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • 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.