Changing date format in PHP

Associate
Joined
21 May 2003
Posts
1,008
Hi. I've got the following code showin the date in a table:

Code:
<?php echo FormatDateTime($x_date,7); ?>

In the table, the date is in the mm/dd/yy format. all I want ot do is display it with the day at least (i.e. Saturday 1st Jan).

is there any way to just convert the date already in $x_date?

I'm using PHP to connect to a MySQL database.
 
ah that's perfect! cheers for that. Here's what i used:

<?php echo date('l jS M', strtotime("$x_date")); ?>

the l (small L) is day e.g. monday
the j is the date withought a leading '0'
the S is nd rd th st depensing on the date
and M is the month!
 
Back
Top Bottom