Jump to content


Photo

MySQL/php date display problems


  • Please log in to reply
2 replies to this topic

#1 cronoklee

cronoklee
  • New Members
  • Pip
  • Newbie
  • 4 posts

Posted 23 May 2006 - 07:25 PM

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!

#2 ober

ober
  • Staff Alumni
  • Advanced Member
  • 5,337 posts
  • LocationEast Coast, USA

Posted 23 May 2006 - 07:27 PM

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

Info: PHP Manual


#3 cronoklee

cronoklee
  • New Members
  • Pip
  • Newbie
  • 4 posts

Posted 24 May 2006 - 01:57 PM

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

Perfect! Got it in one! Thanks a million!




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users