First, convert the string into a timestamp:
$timestamp = strtotime($string);
Then do a
date("Y-m-d H:i:s", $timestamp);
More Related Contents:
- If number have inside number string [closed]
- recurring system my sql query [closed]
- Php date() Date and time is stuck [closed]
- Cannot modify header information [duplicate]
- inserting information and image in php and mysql
- CodeIgniter – foreach loop
- mysqli or die, does it have to die?
- Project Links do not work on Wamp Server
- PHP/MySQL insert row then get ‘id’
- Show values from a MySQL database table inside a HTML table on a webpage [duplicate]
- Using Jquery Ajax to retrieve data from Mysql
- PHP file cannot enter some part of code
- Laravel migration: unique key is too long, even if specified
- Laravel: PDOException: could not find driver
- Laravel Eloquent select all rows with max created_at
- MySQL – count total number of rows in php
- Advantages Of MySQLi over MySQL [closed]
- Fix Access denied for user ‘root’@’localhost’ for phpMyAdmin
- SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax — PHP — PDO [duplicate]
- What does a successful MySQL DELETE return? How to check if DELETE was successful?
- Grouping WHERE clauses in Codeigniter
- Using if(isset($_POST[‘submit’])) to not display echo when script is open is not working
- check if the query results empty row mysqli [duplicate]
- PHP – Import CSV file to mysql database Using LOAD DATA INFILE
- double results in my array ( mysql_fetch_array )
- How best to get someone’s ‘rank’ from a scores table with php and mysql without looping
- php:Store image into Mysql blob, Good or bad?
- Connect to remote MySQL server with SSL from PHP
- Using MySQL’s TIMESTAMP vs storing timestamps directly
- MYSQL select a piece of a string and order by that piece