What do you want to save?
Add Code snippet
New code examples
-
PHP 2021-11-16 21:28:25
laravel wheredate
$q->whereDate('created_at', '=', date('Y-m-d')); Add solution -
-
Other 2021-11-11 14:14:13
get all the between dates from start and end date carbon
$period = CarbonPeriod::create('2018-06-14', '2018-06-20'); // Iterate over the period foreach ($period as $date) { echo $date->format('Y-m-d'); } // Convert the period to an array of dates $dates = $period->toArray(); Add solution -
PHP 2021-11-09 14:40:13
php date timestamp now
//Get current date time in PHP // Simply: $date = date('Y-m-d H:i:s'); // Or: $date = date('Y/m/d H:i:s'); // This would return the date in the following formats respectively: $date = '2012-03-06 17:33:07'; // Or $date = '2012/03/06 17:33:07'; /** *... Add solution -
PHP 2021-11-08 21:36:08
remove time from date php
$date = '2012-09-09 03:09:00'; $createDate = new DateTime($date); $strip = $createDate->format('Y-m-d'); var_dump($strip); // string(10) "2012-09-09" $now = new DateTime(); $difference = $now->diff($createDate, true); var_dump($differen... Add solution