date('F', time()) code example Example: php extract time from datetime $time = '2013-01-22 10:45:45'; echo $time = date("H:i:s",strtotime($time));