Welcome to collectivesolver - Programming & Software Q&A with code examples. A website with trusted programming answers. All programs are tested and work.

Contact: aviboots(AT)netvision.net.il

Prodentim Probiotics Specially Designed For The Health Of Your Teeth And Gums

Instant Grammar Checker - Correct all grammar errors and enhance your writing

Teach Your Child To Read

Powerful WordPress hosting for WordPress professionals

Disclosure: My content contains affiliate links.

31,166 questions

40,722 answers

573 users

How to convert string to datetime in PHP

Freaking Awesome WordPress Hosting
69 views
asked Jun 11, 2020 by avibootz
edited Jul 2, 2020 by avibootz

1 Answer

0 votes
$s = "2020-06-11 11:01:23";

$sdt= strtotime($s);

$dt = date('Y/m/d H:i:s', $sdt);      

echo $dt;

   

/*
run:

2020/06/11 11:01:23

*/

 





answered Jun 11, 2020 by avibootz

Related questions

1 answer 18 views
4 answers 43 views
43 views asked Sep 27, 2023 by avibootz
1 answer 45 views
1 answer 76 views
76 views asked Jun 12, 2020 by avibootz
1 answer 71 views
...