0

Part of PHP code

[" .$row["comment_datetime"] . "] 

The rest of the PHP will not put here because anyone can create own example (query, SQL connect, etc. ...)

The echo output:

[YYYY-MM-DD HH:MM:SS]

Dharman
  • 30,962
  • 25
  • 85
  • 135

1 Answers1

1

Use strtotime:

<?php
  echo date('d - m - Y', strtotime($row["comment_datetime"]));
?>       
Aiken
  • 272
  • 1
  • 8