If $returnDate is set to true, this function returns the date part
else it returns the time part.
function SeparateDateFromTime($d, $returnDate)
{
$retValue = "";
if ($returnDate==True) { // return date...
$retValue = trim(substr($d, 0, stripos($d, " ")));
}
else { // return time...
$retValue = trim(substr($d, stripos($d, " ")));
}
return $retValue;
}
No comments:
Post a Comment