Forum Moderators: coopster
2005-06-20T11:00:00
...for the representation of meeting dates for their sales teams. I'm working on an interface where these teams can log in, review applicable meetings, and find out when these meetings are taking place.
The only problem... I cannot for the life of me figure out how to convert these strings into anything resembling a formatted date.
Does anyone know how to do this?
<?
$tstr = '2005-06-20T11:00:00';
echo '<p>orig: ',$tstr;
$tstr2 = strtotime [php.net]($tstr);
echo '<p>after strtotime: ',$tstr2;
$ftime = strftime('%r %A %B %d, %Y',$tstr2);
echo '<p>formatted output:<br>',$ftime;
?>
you just need to apply your desired format to strftime [php.net]
$your_formatted_date = date("D, Y-m-d", strtotime("2005-06-20T11:00:00"));
You can catch the format codes for date at [php.net...]