Return a new DateTime object, and then format the date:
The date_format() function returns a date formatted according to the specified format.
Parameter | Description |
---|---|
object | Required. Specifies a DateTime object returned by date_create() |
format | Required. Specifies the format for the date |
Return Value: | Returns the formatted date as a string. FALSE on failure |
---|---|
PHP Version: | 5.2+ |