M
M
mikdeveloper2020-05-24 14:14:25
PHP
mikdeveloper, 2020-05-24 14:14:25

How to get the date and time from the database by DD MM YYYY HH MM?

I save the date and time in the database, but it is saved as 2020-05-24 14:01:04

How to make it show on the page as 24-05-2020 14:01:04 ?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
iBird Rose, 2020-05-24
@mikdeveloper

<?php
$date = strtotime("2020-05-24 14:01:04");
echo date("d-m-Y G:i:s", $date);

L
Lazy @BojackHorseman PHP, 2020-05-24
Tag

MySQL DATE_FORMAT() Function

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question