Jump to content

Archived

This topic is now archived and is closed to further replies.

cronoklee

MySQL/php date display problems

Recommended Posts

Hi all,
I've got a date column in a database in the format YYYY-DD-MM.
I grab the date from the database into a php array and echo it to the page.
I am from Ireland, so I would like the date displayed as DAY, DD/MM/YY but it comes up in some crazy inside out way. I'm using the code below:

echo date("l d/m/y", $infoarray['date']);

I can't for the life of me figure it out. Can anyone help please?

Thanks in advance!

Share this post


Link to post
Share on other sites
echo date("l d/m/y", strtotime($infoarray['date']));

Share this post


Link to post
Share on other sites
[!--quoteo(post=376446:date=May 23 2006, 08:27 PM:name=ober)--][div class=\'quotetop\']QUOTE(ober @ May 23 2006, 08:27 PM) [snapback]376446[/snapback][/div][div class=\'quotemain\'][!--quotec--]
echo date("l d/m/y", strtotime($infoarray['date']));
[/quote]

Perfect! Got it in one! Thanks a million!

Share this post


Link to post
Share on other sites

×

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.