Can someone please help me?
I have a date which is being echoed in the following format:
Thu, 3 Oct 2013 11:15:06 +0100
How can I get this to display like this 03 Oct?
Any help greatly appreciated with this, Thanks in advance.
Can you show the few lines echoing this?
Thanks for the reply Cups!
The date is coming from an rss feed which I'm publishing on my webpage.
All I'm doing to display the date is <?php echo $pubDate;?> and thats how it displays.
Does that help any?
$date = new DateTime($pubDate);
echo $date->format('M m');
Or, in PHP <5.3:
$date = strtotime($pubDate);
echo date('M m', $date);
Thanks very much for the help guys!
Your code will work just fine in any version of PHP that has the
DateTime class: that is, PHP >= 5.2.0.
This topic is now closed. New replies are no longer allowed.