Return to Snippet

Revision: 5944
at April 15, 2008 14:34 by isaac

Initial Code
//This code is extracted from the comments on the docs
// Date: d-m-y => y-m-d

$time =explode("-","12-04-2008");
	print "<p>".implode("-",$time)."</p>";

//Will return: 2008-04-12.

Initial URL

Initial Description
This changes the date format from d-m-y to y-m-d on PHP. It's easy to change the - to / or spaces...

Initial Title
Easy transform date format d-m-y => y-m-d on PHP

Initial Tags
php, date, format

Initial Language