Convert timestamp to Date readable format in MySQL query

SQL query to convert timestamp to date readable format, which is stored in MySQL database.

SELECT t.*, DATE_FORMAT(FROM_UNIXTIME(t.enteredOn), ‘%e %b %Y’) AS formated_date FROM tbl_sample AS t;

For the detailed reference on DATE_FORMAT() and FROM_UNIXTIME()

Read More

Get Date value based on User Locale – Zend PHP

Use the code given below to get the date value in desired format based on user locale using Zend_Date() & Zend_Locale().


Read More