Conversion of timestamps

QuestionsConversion of timestamps
Bastian Roehner asked 11 years ago

Hello Mr. Ghufran,

I would like to know, how unix timestamps can be converted to show date and time readably.

For example I have a timestamp 1374182287. It would be fine if the grid would show 18.07.2013 – 23:18:07 instead.

How can this be arranged? I have read the documentation but did not found a solution. But I think it is a common issue.

Thanks in advance,
Bastian

1 Answers
Abu Ghufran answered 11 years ago

Hello,

You need to use mysql from_unixtime function in SQL.

SELECT FROM_UNIXTIME(1196440219); -> '2007-11-30 10:30:19'

Your Answer

15 + 12 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?