Lowest price ever! Learn Generative AI for 48% less!
Get my discount+ 2
$to = \Carbon\Carbon::createFromFormat('Y-m-d H:s:i', '2015-5-5 3:30:34');
$from = \Carbon\Carbon::crea teFromFormat('Y-m-d H:s:i', '2015-5-6 9:30:34');
$diff_in_days = $to->diffInDays($from);
print_r($diff_in_days);
Here's the script to do so with carbon