From my question,
Below is my code
echo "<td>" . $row['StartTime'] . "</td>";
'StartTime' is a row in a database table that displays DATETIME format. Want to ask, how to display Date only at my PHP page?
From my question,
Below is my code
echo "<td>" . $row['StartTime'] . "</td>";
'StartTime' is a row in a database table that displays DATETIME format. Want to ask, how to display Date only at my PHP page?
Just need to use format function of php as shows
echo "<td>" .$row['StartTime']->format('Y-m-d'). "</td>";
Hope it helps.
Go through the documentation also
https://www.php.net/manual/en/datetime.format.php.
As per the comments
echo "<td>" .date('Y-m-d',strtotime($row['StartTime'])."</td>";;