Well, I save the date\'s with minutes and second in my database.
And I want to check if the date from my db = to date today.
my db = to date today
I read about this,
Here you go:
$dbdate = '8/21/2015 11:16:12 AM'; //add your database date here $dt = new DateTime($dbdate); $date = $dt->format('Y-m-d'); $today = date("Y-m-d"); //get current date //now compare your dates if($date == $today) { }