Print date in specified format
by RameshKumar[ Edit ] 2010-01-28 10:38:40
The "Date()" function returns a string in the specified format for a date and time.
<?php
echo date("Y/m/d");
echo "<br/>";
echo date("Y.m.d");
echo "<br/>";
echo date("Y-m-d");
?>
Result:
2010/01/28
2010.01.28
2010-01-28