Found a great little snippet of code to use for converting from American to Euro date format and back.


$date=’12/31/2006’;
print ereg_replace(”([0-9] )/([0-9] )/([0-9] )”,”\\2/\\1/\\3″,$date);

Thanks to last-child.com for the Snippet.




2 Responses to “PHP – Convert American to European Date Format”  

  1. 1 Justin Sainton

    Much simpler and more consistent results by using echo date( ‘m-d-Y’, strtotime( $date) )

  2. 2 Morten

    Thx Justin Sainton, just what i was looking for!

Leave a Reply