Monday, 29 May 2017 07:24

PHP date_format() Function

Syntax

date_format(object,format);

This function returns a formatted date.

 

Example
<?php
$Objdate=date_create("2017-05-29");
echo date_format($Objdate,"Y/m/d H:i:s");
?>
Result
 
 2017/05/29 00:00:00
 
Last modified on Monday, 29 May 2017 08:03

Leave a comment

Make sure you enter all the required information, indicated by an asterisk (*). HTML code is not allowed.