i have the following row in my database:
'1', '1', '1', 'Hello world', 'Hello', '2014-01-14 17:33:34'
Now i wish to select this row and get only the date from this timestamp:
i have tried the following:
SELECT title, FROM_UNIXTIME(timestamp,'%Y %D %M') AS MYDATE FROM Team_Note TN WHERE id = 1
I have also tried:
SELECT title, DATE_FORMAT(FROM_UNIXTIME(`timestamp`), '%e %b %Y') AS MYDATE FROM Team_Note TN WHERE id = 1
However these just return an empty result (or well i get the Hello part but MYDATE is empty)
Did you try this?
SELECT title, date(timestamp) AS MYDATE
FROM Team_Note TN
WHERE id = 1
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With