php - How to echo row (datetime) with other format? -


this question has answer here:

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"])); ?>        

Popular posts from this blog

c# - ODP.NET Oracle.ManagedDataAccess causes ORA-12537 network session end of file -

matlab - Compression and Decompression of ECG Signal using HUFFMAN ALGORITHM -

utf 8 - split utf-8 string into bytes in python -