0

My timestamp in MySQL is 1571591400 and I want to get the date from this timestamp. I have tried a number of things but but nothing has worked.

"SELECT * FROM fixture_fixture WHERE from_unixtime(event_timestamp, '%Y-%m-%d') = '$date'";
2

2 Answers 2

1

Below may help.

SELECT FROM_UNIXTIME(1571591400, '%D %M %Y');
o/p - '20th October 2019'
SELECT FROM_UNIXTIME(1571591400) As 'String';
o/p - '2019-10-20 21:10:00'
Sign up to request clarification or add additional context in comments.

Comments

0

If you want date from you timestamp then you should trythis

  SELECT DATE_FORMAT(FROM_UNIXTIME(column_name), '%e %b %Y') AS 'date_formatted' FROM `fixture_fixture `

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.