Answers for "How to get the time from datetime variable php"

PHP
1

php extract time from datetime

$time = '2013-01-22 10:45:45';

echo $time = date("H:i:s",strtotime($time));
Posted by: Guest on July-01-2020
2

php get current time and date

date("Y-n-j G:i:s");
//-->2020-10-29 23:27:15
Posted by: Guest on October-29-2020

Code answers related to "How to get the time from datetime variable php"

Browse Popular Code Answers by Language