CakePHP 3 Displaying Date With Format


Displaying date in your view with a format that you want is easy in CakePHP 3. Just use this simple 3code:

$yourDate->format('Y-m-d');

for example

$post->created->format('Y-m-d H:i:s');

Done!

Comment / Response

Your Comment / Response