php - How to display words before last character / of a date? -
i have date in format "2015/06/15". want "2015/06" output string.
how that?
you can several way: like:
echo date("y/m", strtotime("2015/06/15"))
$arrdt = explode("/", "2015/06/15"); $newdt = $arrdt[0]."/".$arrdt[1];
Comments
Post a Comment