October 7, 2019

Converting UNIX_TIMESTAMP to Readable Format in MySQL

MySQL has lot of support for working with date and time. The following is a quick and neat way of converting the current time from Unix format to Readable format. Query: SELECT FROM_UNIXTIME(UNIX_TIMESTAMP(), ‘%a %D %M %Y %h:%i:%s %p’) AS ‘CURRENT TIME’; Sample Output: +————————————–+| CURRENT TIME |+————————————–+| Tue 24th