Languages
[Edit]
EN

MySql - how to convert unix timestamp to datetime?

7 points
Created by:
Keisha-Acosta
380

Using MySql it is possible to convert UNIX timestamp to datetime in following way.

1. Built-in FROM_UNIXTIME function example

This example shows a new column with timestamp converted to a more readable form.

SELECT *, FROM_UNIXTIME(`sent_at`) AS `sent_at_datetime`
FROM `messages`
WHERE `sender_name` = 'John';

 

Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.

MySQL - dates

Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join