Answers for "php time 24 hour format"

PHP
0

convert am pm time to 24 hour in php

echo date("H:i:s", strtotime("04:25 PM"));
Posted by: Guest on September-07-2020
2

date to string php

$date_string_prepared = date_create("2020-08-07");
$date_string = $date_string_prepared->format("d M Y");
// result 07 Jul 2020
Posted by: Guest on August-29-2020
6

php get day of week

date('w'); //gets day of week as number(0=sunday,1=monday...,6=sat)

//note:returns 0 through 6 but as string so to check if monday do this:
if(date('w') == 1){
	echo "its monday baby";
}
Posted by: Guest on July-19-2019

Code answers related to "php time 24 hour format"

Browse Popular Code Answers by Language