php - How to echo row (datetime) with other format? -
this question has answer here:
- convert 1 date format in php 12 answers
part of php code (mysqli)
[" .$row["comment_datetime"] . "]
the rest of php not put here because can create own example (query, sql connect, etc ...)
the echo output:
[yyyy-mm-dd hh:mm:ss]
p.s: question don't duplicate because, trying echo on row-><-mysqli
thanks aiken, code has been converted.
use strtotime:
<?php echo date('d - m - y', strtotime($row["comment_datetime"])); ?>