Print date in specified format

by RameshKumar 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



Tagged in:

966
like
0
dislike
0
mail
flag

You must LOGIN to add comments