How do i convert a date like:
1993-09-13 00:00:00.000
into:
09-13-1993
thanks a lot
s
$date = '1993-09-13 00:00:00.000'; echo date('m-d-Y', strtotime($date));
thats similar to what Ive tried... but it returns:
12-31-1969
php1111 wrote:thats similar to what Ive tried... but it returns: 12-31-1969
thats similar to what Ive tried... but it returns: 12-31-1969
what returns 12-31-1969? exactly what i posted or something "similar"? on my box using my exact code i am getting 09-13-1993.
i used the exact same thing! :-( is there any other way I can do it?
can someone help me? :-(
This is a cheesy way to do it:
function date_format($in){ $a=explode(" ",$in); $b=explode("-",$a[0]); return $b[1]."-".$b[2]."-".$b[0]; }