I have following query and data saved in a MySQL database with a timestamp column. I have to display the timestamp as the actual data and time format like 1333007294 it should be displayed as 03-MAR-2012 12:48:14 PM. I have tried to use MySQL using from_unixtime but it displays the datetime like this 3/29/2012 12:00:00 am. I need to get the format like 03-MAR-2012 12:48:14 PM here is my query.
SELECT DATE( FROM_UNIXTIME( `timestamp` ) ) AS timestamp
from vlasteventwdevice
order by 1 desc
Try like this:
You can make the result upper case later in your application code