dcsimg
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Language: SQL
Expertise: Intermediate
Oct 7, 2019

WEBINAR:

On-Demand

Building the Right Environment to Support AI, Machine Learning and Deep Learning


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 September 2019 06:21:03 PM  |
+--------------------------------------+ 
M S Sridhar
 
Thanks for your registration, follow us on our social networks to keep up-to-date