I am facing a small problem in MySQL table. In one cell, date is written in unix_timestamp format, but I am unable to display it on web as human readable format. Is there any way to make new cell which would take the date and display as human readable format ? I have provided below a snapshot of my requirement to make it more clear:
date | human readable format |
-----------|--------------------------------|
1206624265 |would display date as YYYY MM/DD|
I am not concerned about format of the info in 'date' column in the above snapshot.
You can use the built-in date functions from Mysql. In your case you should use the 'FROM_UNIXTIME' function which converts a unix timestamp to a formated date string.
FROM_UNIXTIME MySQL Documentation:
See the Examples from the MYSQL Documentation
In your case I would prefer to create a view.
Like this:
Because so you have no redudant data and you can use the view similar as a table.