Jump to content


Photo

[SOLVED] Format date


  • Please log in to reply
2 replies to this topic

#1 willpower

willpower
  • Members
  • PipPipPip
  • Advanced Member
  • 296 posts
  • LocationWarrington, Cheshire, UK

Posted 07 June 2006 - 01:13 PM

Hi

I have a variable stored in a DB using the DATETIME method

I now need to format that

I can format using the $now=date (jS, M etc) method

but how do I do it for a defined variable from the DB?

Thanks

Will
Wait...I've got it...Bollocks, it's gone again!

If at first you don't succeed....stop using ASP and get onto PHP

#2 ober

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

Posted 07 June 2006 - 01:22 PM

echo date("n/j/Y h:i:s A", strototime($row['column_name']));

Info: PHP Manual


#3 willpower

willpower
  • Members
  • PipPipPip
  • Advanced Member
  • 296 posts
  • LocationWarrington, Cheshire, UK

Posted 07 June 2006 - 01:27 PM

Thanks matey!

Hope you are well

Will
Wait...I've got it...Bollocks, it's gone again!

If at first you don't succeed....stop using ASP and get onto PHP




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users