Feb
27
2010

String dd-mm-yyyy convert to date yyyy-mm-dd

<?php

$date = "25-12-2010";//[something in US format: mm-dd-yy]
$newdate = substr($date,6,4) . "-" . substr($date,3,2) . "-" . substr($date,0,2);

print "\n=====\n".$newdate."\n===============\n";

?>

About the Author: Urban Cetinski

Urban Cetinski :)

Leave a comment

Get Adobe Flash playerPlugin by wpburn.com wordpress themes