Possible Duplicate:
Convert timestamp to readable date/time PHP
Given 1328520572 as a datetime string, how can i get the datetime in specific format from it ?
I'd like to use
str = '1328520572';
str_ret=datetime.Parse("M:D:Y H:M:S",str);
$str = '1328520572';
echo date("M:D:Y H:M:S", (int)$str);
But your date format is wrong, check the right format here.
Properly formatted datetime
?
$unix = '1328520572';
$datetime = date('Y-m-d H:i:s', $unix);
$str_ret = date("m:d:Y H:i:s", $str);
Try this:
$str = '1328520572';
$str_ret = date('M:D:Y H:M:S', strtotime($str));