Answers for "if i want to remove mili milliseconds from string in php"

PHP
1

show date time with milliseconds php

$now = DateTime::createFromFormat('U.u', microtime(true));
echo $now->format("m-d-Y H:i:s.u");
Posted by: Guest on June-04-2020
0

if i want to remove mili milliseconds from string in php

$date = "2021-07-05 08:35:21.000000";
$d = strtotime($date);
echo date("Y-m-d h:i:s", $d);
Posted by: Guest on July-05-2021

Code answers related to "if i want to remove mili milliseconds from string in php"

Browse Popular Code Answers by Language