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'";
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'";
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'
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 `