Jump to content

MySQL/php date display problems


cronoklee

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!
Link to comment
https://forums.phpfreaks.com/topic/10290-mysqlphp-date-display-problems/
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!

Archived

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

×
×
  • Create New...

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.