Select Page
Formatting a date using PHP

Formatting a date using PHP

[toc]In my last article I explained how to format a date in MySQL using a built-in function that can be used during a database query. In this article I’m going to leave databases and talk about how to do the same thing in PHP. The timestamp Before you can format...
Formatting a date using PHP

How to format dates directly in MySQL

[toc]This tutorial explains how to format a MySQL date field to suit your needs without using PHP or any other post-processing.For example, you can output your dates in a long format such as Monday, 12th May 2016 or as a short date format – 17/Dec/86. MySQL...