Convert from MySQL datetime to another format with PHP

Refer to the PHP date formatting options to adjust the format.

PHP date() format when inserting into datetime in MySQL

The problem is that you're using 'M' and 'D', which are a textual representations, MySQL is expecting a numeric representation of the format 2010-02-06 19:30:13. Try: date("Y-m-d H:i:s"...

Storing datetime as UTC in PHP/MySQL - Stack Overflow

I'm curious to hear if someone has a reliable solution for this problem, one that doesn't break when dates traverse media boundaries (HTTP->PHP->MySQL and MySQL->PHP->HTTP)...

adding 30 minutes to datetime php/mysql - Stack Overflow

Not the answer you're looking for? Browse other questions tagged php mysql datetime strtotime or ask your own question.

Datetime comparison PHP/Mysql? - Stack Overflow

MySQL performs comparisons much faster than PHP. If you filter your data in the query then less, or no time is spent transferring superfluous data back to the application.

Datetime vs Timestamp in MySQL and PHP in practice?

Not for technical reasons, but since you are still unclear on how MySQL works, DATETIME is the simpler choice. This will mean that you will have to calculate the current timestamp in PHP before...

MySQL Tutorial - Date | dp_datetime

PHP & MySQL Code: <?php $query_manual = "INSERT INTO dateplayground (dp_name, dp_datetime) VALUES ('DATETIME: Manual DateTime', '1776-7-4 04:13...

MySQL Datetime to PHP date format | Code Karate

Now you can print the date in any format you want

Работа с датой и временем в MySQL, PHP

Работа с датой и временем в MySQL+PHP. Ниже представлен пример, в котором


Is there an easy way of formatting a MySQL DATETIME field in PHP. At the moment I'm using the code below, as using the returned DATETIME value from the database with the date...

Поиск реализован с помощью Yandex XML и Google Custom Search API