Usually, the format that we used to save date in our table is Y-m-d in which the result is something like this: 2016-01-21. So to make your date more readable to users, you need to format it.
Code
<?phpOutput
$date_posted="1970-01-01";//Let's just assume that the value from the table is like that.
echo date("M d, Y",strtotime($date_posted));
?>
0 comments:
Post a Comment