Tedit kap wrote:
> Hi,
> I would like to modify the dae display format, for the dates stored in my 
> database. 
> It is stored like this: 2008-07-01
> I want to print as: July, 1st
> Now I wrote something as below, but it displays Dec 31st instead of July 1st. 
> (And in my database Dec31 is nowhere anyway). Please tell me how to fix.
> Here is the relevant part of code:
> while ($row = mysql_fetch_array($query)) {
> $c1=$row['date'];
> $c=date('F jS',$c1);
> echo"<p class='title1'>" . $c."<br/>". $row['title'] . "</p>" ; }
> Thanks

20080712 1555 GMT-6

What I would do is, get each of the three parts and put them in a variable:
$y = "2008";
$m = "07";
$d = "01";

and then using mktime you could format it properly.

Wade

Reply via email to