MySQL Timestamp format
55,718
Solution 1
Use FROM_UNIXTIME()
SELECT FROM_UNIXTIME(1384204028);
or (equivalent but with parameter to control the format):
SELECT FROM_UNIXTIME(1384204028, '%Y-%m-%d %H:%i:%s');
Solution 2
SELECT DATE_FORMAT(NOW(), '%Y-%m-%d %H:%i:%s')
Author by
Devel
Updated on July 12, 2022Comments
-
Devel almost 2 years
I have exported my database to a CSV file and the timestamp now liiks like this:
1384204028
How can I convert it to the typical format, for example
2013-01-19 03:14:07
?