I have the following table in a MySQL database:
+----------+---------------------+-----------------+---------------+
| id | firstName | lastName | tstamp |
+----------+---------------------+-----------------+---------------+
| 133 | James | Mosher | 1589470887919 |
| 145 | Bill | Turner | 1589470888235 |
| 146 | Jeremy | Vine | 1589470888592 |
| 152 | Ramon | Jesus | 1589470889319 |
+----------+---------------------+-----------------+---------------+
I want to be able to see the tstamp column in a human readable date time format. I tried the following query but it didn't work and gave me a blank column. Anyone has any idea or see what I am doing wrong?
SELECT id, firstName, lastName, tstamp, FROM_UNIXTIME(tstamp, '%Y %D %M %H:%i:%s') AS timeAndDate FROM students;
Result:
+----------+---------------------+-----------------+---------------+---------------+
| id | firstName | lastName | tstamp | timeAndDate |
+----------+---------------------+-----------------+---------------+---------------+
| 133 | James | Mosher | 1589470887919 | |
| 145 | Bill | Turner | 1589470888235 | |
| 146 | Jeremy | Vine | 1589470888592 | |
| 152 | Ramon | Jesus | 1589470889319 | |
+----------+---------------------+-----------------+---------------+---------------+
Example -> https://www.db-fiddle.com/f/nfSnTKfNYdBcbs8pDgbcdQ/0