This function format a local time/date. The required format parameter in the date() function specifies how to format the date/time. The date function uses letters of the alphabet to represent various parts of a typical date and time format.
Here are some characters that can be used:
Other characters, like"/", ".", or "-" can also be inserted between the letters to add additional formatting:
<?php
echo date("Y/m/d") . "<br />";
echo date("Y.m.d") . "<br />";
echo date("Y-m-d")
?>
The output of the code above could be something like this: