my problem is when the time and date stored in database the result in database is 0000-00-00 00:00:00.000000. how do the results match with the current time and date???
for this i used following the code:
$dateandtime = $_SERVER['REQUEST_TIME'];
my problem is when the time and date stored in database the result in database is 0000-00-00 00:00:00.000000. how do the results match with the current time and date???
for this i used following the code:
$dateandtime = $_SERVER['REQUEST_TIME'];
Use date() as the function formats a local date and time, and returns the formatted date string. Example:-
$date = date('m/d/Y H:i:s ', time());
This prints date and time in 24 hour format. For 12 hour with am/pm use:-
$date = date('m/d/Y h:i:s A', time());
I hope it help's you