Print date in specified format - PHP Views : 226
Tagged in : PHP
0 0
Send mail

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



By RameshKumar, On - 2010-01-28



    Login to add Comments .