Issue
I want to select the rows with custom date format in MySQLi. Here is the image of my database.
if the `publish_date` is like 1540182298,1540182469,1540183281
$sql="SELECT * FROM new_enquery WHERE date_format(publish_date, '%Y')='2018'";
Solution
Seems unix timestamp so you could try using FROM_UNIXTIME
SELECT * FROM new_enquery WHERE FROM_UNIXTIME(publish_date, '%Y')= '2018'
Answered By - ScaisEdge
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.